]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Adds two missing link fields (patron profile and patron home library) to
[working/Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                         <field reporter:label="Update Bib. Source" name="update_bib_source" reporter:datatype="bool"/>
204                 </fields>
205                 <links>
206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
207                 </links>
208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
209                         <actions>
210                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
211                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
212                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
213                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
214                         </actions>
215                 </permacrud>
216         </class>
217
218         <class id="vibtf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_bib_trash_fields" oils_persist:tablename="vandelay.import_bib_trash_fields" reporter:label="Import/Overlay Fields for Removal">
219                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
220                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
221                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
222                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
223                 </fields>
224                 <links>
225                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
226                 </links>
227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
228                         <actions>
229                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
230                     <context link="grp" field="owner"/>
231                 </create>
232                                 <retrieve/>
233                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
234                     <context link="grp" field="owner"/>
235                 </update>
236                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
237                     <context link="grp" field="owner"/>
238                 </delete>
239                         </actions>
240                 </permacrud>
241         </class>
242
243         <class  id="vibtg" 
244             controller="open-ils.cstore open-ils.pcrud" 
245             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
246             oils_persist:tablename="vandelay.import_bib_trash_group" 
247             reporter:label="Import/Overlay Field Groups for Removal">
248                 <fields oils_persist:primary="id" 
249                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
250                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
251                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
252                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
253                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
254                 </fields>
255                 <links>
256                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
257                 </links>
258                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
259                         <actions>
260                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
261                                 <retrieve/>
262                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
264                         </actions>
265                 </permacrud>
266         </class>
267
268
269         <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">
270                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
271                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
272                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
273                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
274                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
275                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
276                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
277                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
278                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
279                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
280                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
281                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
282                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
283                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
284                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
286                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
287                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
288                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
289                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
290                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
291                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
292                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
293                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
294                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
295                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
296                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
297                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
298                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
299                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
300                 </fields>
301                 <links>
302                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
303                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
304                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
305                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
306                 </links>
307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
308                         <actions>
309                                 <create permission="CREATE_IMPORT_ITEM">
310                     <context link="definition" field="owner"/>
311                                 </create>
312                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
313                     <context link="definition" field="owner"/>
314                                 </retrieve>
315                                 <update permission="UPDATE_IMPORT_ITEM">
316                     <context link="definition" field="owner"/>
317                                 </update>
318                                 <delete permission="DELETE_IMPORT_ITEM">
319                     <context link="definition" field="owner"/>
320                                 </delete>
321                         </actions>
322                 </permacrud>
323         </class>
324
325         <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">
326                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
327                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
328                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
329                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
330                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
331                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
332                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
333                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
334                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
335                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
336                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
337                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
338                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
339                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
340                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
341                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
342                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
343                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
344                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
345                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
346                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
347                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
348                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
349                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
350                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
351                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
352                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
353                         <field reporter:label="Parts Data" name="parts_data" reporter:datatype="text"/>
354                 </fields>
355                 <links>
356                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
357                 </links>
358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
359                         <actions>
360                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
361                                 <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"/>
362                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
363                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
364                         </actions>
365                 </permacrud>
366         </class>
367
368         <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">
369                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
370                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
371                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
372                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
373                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
374                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
375                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
376                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
377                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
378                 </fields>
379                 <links>
380                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
381                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
382                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
383                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
384                 </links>
385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
386                         <actions>
387                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
388                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
389                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
390                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
391                         </actions>
392                 </permacrud>
393         </class>
394
395         <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">
396                 <fields oils_persist:primary="code">
397                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
398                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
399                 </fields>
400                 <links>
401                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
402                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
403                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
404                 </links>
405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
406                         <actions>
407                                 <retrieve/>
408                         </actions>
409                 </permacrud>
410         </class>
411
412         <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">
413                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
414                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
415                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
416                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
417                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
418                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
419                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
420                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
421                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
422                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
423                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
424                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
425                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
426                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
427                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
428                 </fields>
429                 <links>
430                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
431                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
432                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
433                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
434             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
435             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
436             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
437                 </links>
438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
439                         <actions>
440                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
441                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
442                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
443                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
444                         </actions>
445                 </permacrud>
446         </class>
447
448         <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">
449                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
450                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
451                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
452                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
453                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
454                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
455                 </fields>
456                 <links/>
457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
458                         <actions>
459                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
460                 <retrieve/>
461                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
462                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
463                         </actions>
464                 </permacrud>
465         </class>
466
467         <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">
468                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
469                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
470                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
471                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
472                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
473                 </fields>
474                 <links>
475                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
476                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
477                 </links>
478                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
479                         <actions>
480                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
481                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
482                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
483                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
484                         </actions>
485                 </permacrud>
486         </class>
487
488         <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">
489                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
490                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
491                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
492                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
493                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
494                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
495                 </fields>
496                 <links>
497                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
498                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
499                 </links>
500                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
501                         <actions>
502                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
503                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
504                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
505                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
506                         </actions>
507                 </permacrud>
508         </class>
509
510         <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">
511                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
512                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
513                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
514                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
515                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
516                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
517                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
518                 </fields>
519                 <links>
520                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
521                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
522                 </links>
523                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
524                         <actions>
525                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
527                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
528                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
529                         </actions>
530                 </permacrud>
531         </class>
532
533         <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">
534                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
535                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
536                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
537                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
538                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
539                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
540                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
541                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
542                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
543                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
544                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
545                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
546                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
547                 </fields>
548                 <links>
549                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
550                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
551                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
552             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
553             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
554                 </links>
555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
556                         <actions>
557                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
558                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
559                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
560                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
561                         </actions>
562                 </permacrud>
563         </class>
564
565         <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">
566                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
567                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
568                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
569                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
570                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
571                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
572                 </fields>
573                 <links/>
574                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
575                         <actions>
576                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
577                 <retrieve/>
578                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
579                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
580                         </actions>
581                 </permacrud>
582         </class>
583
584         <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">
585                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
586                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
587                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
588                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
589                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
590                 </fields>
591                 <links>
592                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
593                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
594                 </links>
595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
596                         <actions>
597                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
598                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
599                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
600                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
601                         </actions>
602                 </permacrud>
603         </class>
604
605         <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">
606                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
607                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
608                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
609                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
610                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
611                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
612                 </fields>
613                 <links>
614                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
615                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
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="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">
628                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
629                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
630                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
631                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
632                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
633                 </fields>
634                 <links>
635                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
636                 </links>
637                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
638                         <actions>
639                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
640                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
641                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
642                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
643                         </actions>
644                 </permacrud>
645         </class>
646
647         <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">
648                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
649                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
650                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
651                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
652                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
653                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
654                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
655                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
656             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
657                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
658                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
659                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
660                 </fields>
661                 <links>
662                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
663                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
664                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
665                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
666                 </links>
667                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
668                         <actions>
669                                 <create permission="ADMIN_IMPORT_MATCH_SET">
670                     <context link="match_set" field="owner"/>
671                                 </create>
672                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
673                     <context link="match_set" field="owner"/>
674                                 </retrieve>
675                                 <update permission="ADMIN_IMPORT_MATCH_SET">
676                     <context link="match_set" field="owner"/>
677                                 </update>
678                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
679                     <context link="match_set" field="owner"/>
680                                 </delete>
681                         </actions>
682                 </permacrud>
683         </class>
684
685         <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">
686                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
687                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
688                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
689                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
690                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
691                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
692                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
693                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
694                 </fields>
695                 <links>
696                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
697                 </links>
698                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
699                         <actions>
700                                 <create permission="ADMIN_IMPORT_MATCH_SET">
701                     <context link="match_set" field="owner"/>
702                                 </create>
703                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
704                     <context link="match_set" field="owner"/>
705                                 </retrieve>
706                                 <update permission="ADMIN_IMPORT_MATCH_SET">
707                     <context link="match_set" field="owner"/>
708                                 </update>
709                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
710                     <context link="match_set" field="owner"/>
711                                 </delete>
712                         </actions>
713                 </permacrud>
714         </class>
715
716         <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">
717                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
718                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
719                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
720                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
721                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
722                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
723                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
724                 </fields>
725                 <links>
726                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
727                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
728                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
729                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
730                 </links>
731         </class>
732
733     <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">
734         <fields oils_persist:primary="name">
735             <field reporter:label="Name" name="name" reporter:datatype="text"/>
736             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
737             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
738             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
739         </fields>
740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
741             <actions>
742                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
743                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
744                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
745                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
746             </actions>
747         </permacrud>
748     </class>
749
750     <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">
751         <fields oils_persist:primary="id">
752             <field reporter:label="ID" name="id" reporter:datatype="id"/>
753             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
754             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
755             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
756             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
757         </fields>
758         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
759             <actions>
760                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
761                 <retrieve/>
762                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
763                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
764             </actions>
765         </permacrud>
766     </class>
767
768         <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">
769                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
770                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
771                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
772                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
773                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
774                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
775                 </fields>
776                 <links>
777                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
778                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
779                 </links>
780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
781             <actions>
782                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
783                 <retrieve/>
784                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
785                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
786             </actions>
787         </permacrud>
788         </class>
789
790         <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">
791                 <fields oils_persist:primary="id">
792                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
793                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
794                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
795         </fields>
796         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
797             <actions>
798                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
799                 <retrieve/>
800                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
801                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
802             </actions>
803         </permacrud>
804         </class>
805
806         <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">
807                 <fields oils_persist:primary="id">
808                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
809                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
810                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
811                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
812                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
813                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
814                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
815                         <field reporter:label="Repeatabl?" name="repeatable" reporter:datatype="bool"/>
816                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
817                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
818                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
819         </fields>
820                 <links>
821                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
822                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
823         </links>
824         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
825             <actions>
826                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
827                 <retrieve/>
828                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
829                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
830             </actions>
831         </permacrud>
832         </class>
833
834         <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">
835                 <fields oils_persist:primary="id">
836                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
837                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
838                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
839                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
840                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" />
841                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
842                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
843                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
844                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
845                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
846         </fields>
847                 <links>
848                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
849                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
850         </links>
851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
852             <actions>
853                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
854                 <retrieve/>
855                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
856                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
857             </actions>
858         </permacrud>
859         </class>
860
861         <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">
862                 <fields oils_persist:primary="name">
863                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
864                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
865                         <field reporter:label="Description" name="description" reporter:datatype="text" />
866                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
867                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
868                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
869                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
870                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
871                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
872                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
873                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
874                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
875                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
876                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
877                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
878                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
879                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
880                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
881                 </fields>
882                 <links>
883                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
884                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
885                 </links>
886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
887             <actions>
888                 <create permission="ADMIN_SVF" global_required="true"/>
889                 <retrieve/>
890                 <update permission="ADMIN_SVF" global_required="true"/>
891                 <delete permission="ADMIN_SVF" global_required="true"/>
892             </actions>
893         </permacrud>
894         </class>
895
896         <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">
897                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
899                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
900                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
901             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
902                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
903                 </fields>
904                 <links/>
905         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
906             <actions>
907                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
908                 <retrieve/>
909                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
910                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
911             </actions>
912         </permacrud>
913         </class>
914
915         <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">
916                 <fields oils_persist:primary="coded_value">
917                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
918                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
919                 </fields>
920                 <links>
921                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
922                 </links>
923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
924             <actions>
925                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
926                 <retrieve/>
927                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
928                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
929             </actions>
930         </permacrud>
931         </class>
932
933         <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">
934                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
935                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
936                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
937                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
938                 </fields>
939                 <links>
940                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
941                 </links>
942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
943             <actions>
944                 <retrieve/>
945             </actions>
946         </permacrud>
947         </class>
948
949
950         <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">
951                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
952                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
953                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
954                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
955                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
956                 </fields>
957                 <links>
958                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
959                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
960                 </links>
961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
962             <actions>
963                 <retrieve/>
964             </actions>
965         </permacrud>
966         </class>
967
968
969         <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">
970                 <fields oils_persist:primary="source">
971                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
972                         <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 -->
973                 </fields>
974                 <links>
975                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
976                 </links>
977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
978             <actions>
979                 <retrieve/>
980             </actions>
981         </permacrud>
982         </class>
983
984         <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">
985                 <fields>
986                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
987                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
988                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
989                 </fields>
990                 <links>
991                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
992                 </links>
993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
994             <actions>
995                 <retrieve/>
996             </actions>
997         </permacrud>
998         </class>
999
1000         <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">
1001                 <fields oils_persist:primary="id">
1002                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1003                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1004                 </fields>
1005                 <links>
1006                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1007                 </links>
1008         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1009             <actions>
1010                 <retrieve/>
1011             </actions>
1012         </permacrud>
1013         </class>
1014
1015         <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">
1016                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1017                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1018                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1019                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1020                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1021                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1022                 </fields>
1023                 <links>
1024                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1025                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1026                 </links>
1027         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1028             <actions>
1029                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1030                 <retrieve/>
1031                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1032                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1033             </actions>
1034         </permacrud>
1035         </class>
1036
1037         <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">
1038                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1039                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1040                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1041                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1042                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1043                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1044                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1045                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1046             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1047             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1048             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1049                 </fields>
1050                 <links>
1051                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1052                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1053                 </links>
1054         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1055             <actions>
1056                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1057                 <retrieve/>
1058                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1059                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1060             </actions>
1061         </permacrud>
1062         </class>
1063
1064         <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">
1065                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1066                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1067                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1068                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1069                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1070                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1071                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1072                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1073                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1074                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1075                 </fields>
1076                 <links>
1077                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1078                 </links>
1079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1080             <actions>
1081                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1082                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1083                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1084                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1085             </actions>
1086         </permacrud>
1087         </class>
1088
1089     <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">
1090         <fields oils_persist:primary="name">
1091             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1092             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1093             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1094             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1095             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1096             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1097             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1098             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1099             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1100             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1101         </fields>
1102         <links>
1103             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1104             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1105         </links>
1106         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1107             <actions>
1108                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1109                 <retrieve/>
1110                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1111                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1112             </actions>
1113         </permacrud>
1114     </class>
1115
1116     <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">
1117         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1118             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1119             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1120             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1121             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1122             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1123             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1124             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1125         </fields>
1126         <links>
1127             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1128         </links>
1129         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1130             <actions>
1131                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1132                 <retrieve/>
1133                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1134                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1135             </actions>
1136         </permacrud>
1137     </class>
1138
1139     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1140                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1141                         oils_persist:tablename="config.z3950_index_field_map" 
1142                         reporter:label="Z39.50 Index Field Map">
1143         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1144             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1145             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1146             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1147             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1148             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1149             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1150         </fields>
1151         <links>
1152             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1153             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1154             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1155         </links>
1156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1157             <actions>
1158                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1159                 <retrieve/>
1160                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1161                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1162             </actions>
1163         </permacrud>
1164     </class>
1165
1166
1167         <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">
1168                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1169                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1170                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1171                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1172                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1173                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1174                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1175                 </fields>
1176                 <links>
1177             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1178             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1179                 </links>
1180                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1181                         <actions>
1182                                 <retrieve/>
1183                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1184                         </actions>
1185                 </permacrud>
1186         </class>
1187
1188         <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">
1189                 <fields oils_persist:primary="key">
1190                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1191                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1192                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1193                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1194                 </fields>
1195                 <links/>
1196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1197                         <actions>
1198                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1199                                 <retrieve/>
1200                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1201                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1202                         </actions>
1203                 </permacrud>
1204         </class>
1205
1206         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1207                 <fields oils_persist:primary="module">
1208                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1209                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1210                 </fields>
1211                 <links/>
1212         </class>
1213
1214         <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">
1215                 <fields oils_persist:primary="module">
1216                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1217                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1218                 </fields>
1219                 <links/>
1220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1221                         <actions>
1222                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1223                                 <retrieve/>
1224                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1225                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1226                         </actions>
1227                 </permacrud>
1228         </class>
1229
1230         <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">
1231                 <fields oils_persist:primary="module">
1232                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1233                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1234                 </fields>
1235                 <links/>
1236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1237                         <actions>
1238                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1239                                 <retrieve/>
1240                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1241                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1242                         </actions>
1243                 </permacrud>
1244         </class>
1245
1246         <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">
1247                 <fields oils_persist:primary="module">
1248                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1249                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1250                 </fields>
1251                 <links/>
1252                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1253                         <actions>
1254                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1255                                 <retrieve/>
1256                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1257                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1258                         </actions>
1259                 </permacrud>
1260         </class>
1261
1262         <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">
1263                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1264                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1265                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1266                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1267                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1268                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1269                 </fields>
1270                 <links>
1271                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1272                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1273                 </links>
1274                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1275                         <actions>
1276                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1277                     <context link="event_def" field="owner"/>
1278                 </create>
1279                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1280                     <context link="event_def" field="owner"/>
1281                 </retrieve>
1282                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1283                     <context link="event_def" field="owner"/>
1284                 </update>
1285                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1286                     <context link="event_def" field="owner"/>
1287                 </delete>
1288                         </actions>
1289                 </permacrud>
1290         </class>
1291
1292         <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">
1293                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1294                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1295                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1296                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1297                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1298                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1299                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1300                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1301                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1302                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1303                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1304                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1305                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1306                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1307                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1308                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1309                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1310                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1311                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1312                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1313                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1314                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1315                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1316                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1317                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1318                 </fields>
1319                 <links>
1320                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1321                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1322                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1323                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1324                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1325                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1326                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1327                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1328                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1329                 </links>
1330                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1331                         <actions>
1332                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1333                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1334                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1335                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1336                         </actions>
1337                 </permacrud>
1338         </class>
1339
1340         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1341                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1342                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1343                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1344                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1345                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1346                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1347                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1348                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1349                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1350                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1351                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1352                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1353                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1354                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1355                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1356                 </fields>
1357                 <links>
1358                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1359                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1360                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1361                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1362                 </links>
1363         </class>
1364
1365         <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">
1366                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1367                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1368                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1369                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1370                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1371                 </fields>
1372                 <links>
1373                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1374                 </links>
1375                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1376                         <actions>
1377                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1378                     <context link="event_def" field="owner"/>
1379                 </create>
1380                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1381                     <context link="event_def" field="owner"/>
1382                 </retrieve>
1383                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1384                     <context link="event_def" field="owner"/>
1385                 </update>
1386                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1387                     <context link="event_def" field="owner"/>
1388                 </delete>
1389                         </actions>
1390                 </permacrud>
1391         </class>
1392
1393         <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">
1394                 <oils_persist:source_definition><![CDATA[
1395                 SELECT  atevdef.hook,
1396                         atevdef.name,
1397                         atevdef.reactor,
1398                         atev.id,
1399                         atev.event_def,
1400                         atev.add_time,
1401                         atev.run_time,
1402                         atev.start_time,
1403                         atev.update_time,
1404                         atev.complete_time,
1405                         atev.update_process,
1406                         atev.state,
1407                         atev.user_data,
1408                         atev.template_output,
1409                         atev.error_output,
1410                         atev.async_output,
1411                         targ_circ.id AS target_circ,
1412                         targ_ahr.id AS target_hold,
1413                         COALESCE(
1414                                 targ_circ.circ_lib,
1415                                 targ_ahr.pickup_lib
1416                         ) AS perm_lib
1417                 FROM action_trigger.event atev
1418                 JOIN action_trigger.event_definition atevdef ON
1419                         (atevdef.id = atev.event_def)
1420                 JOIN action_trigger.hook ath ON
1421                         (ath.key = atevdef.hook)
1422                 LEFT JOIN action.circulation targ_circ ON
1423                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1424                 LEFT JOIN action.hold_request targ_ahr ON
1425                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1426                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1427                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1428                                 'circ.staff.max_visible_event_age',
1429                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1430                         ) UNION
1431                         SELECT '1000 YEARS'::INTERVAL AS value
1432                 ) ous)
1433                 ]]></oils_persist:source_definition>
1434                 <fields oils_persist:primary="id">
1435                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1436                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1437                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1438                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1439                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1440                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1441                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1442                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1443                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1444                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1445                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1446                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1447                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1448                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1449                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1450                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1451                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1452                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1453                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1454                 </fields>
1455                 <links>
1456                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1457                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1458                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1459                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1460                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1461                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1462                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1463                 </links>
1464                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1465                         <actions>
1466                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1467                         </actions>
1468                 </permacrud>
1469         </class>
1470
1471         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1472                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1473                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1474                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1475                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1476                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1477                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1478                 </fields>
1479                 <links>
1480                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1481                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1482                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1483                 </links>
1484                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1485                         <actions>
1486                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1487                         </actions>
1488                 </permacrud>
1489         </class>
1490
1491         <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">
1492                 <fields oils_persist:primary="code">
1493                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1494                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1495                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1496                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1497                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1498                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1499                 </fields>
1500                 <links/>
1501         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1502             <actions>
1503                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1504                 <retrieve/>
1505                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1506                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1507             </actions>
1508         </permacrud>
1509         </class>
1510
1511         <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">
1512                 <fields oils_persist:primary="code">
1513                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1514                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1515                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1516                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1517                 </fields>
1518                 <links/>
1519         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1520             <actions>
1521                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1522                 <retrieve/>
1523                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1524                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1525             </actions>
1526         </permacrud>
1527         </class>
1528
1529         <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">
1530                 <fields oils_persist:primary="code">
1531                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1532                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1533                 </fields>
1534                 <links/>
1535         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1536             <actions>
1537                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1538                 <retrieve/>
1539                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1540                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1541             </actions>
1542         </permacrud>
1543         </class>
1544
1545         <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">
1546                 <fields oils_persist:primary="code">
1547                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1548                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1549                 </fields>
1550                 <links/>
1551         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1552             <actions>
1553                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1554                 <retrieve/>
1555                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1556                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1557             </actions>
1558         </permacrud>
1559         </class>
1560
1561         <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">
1562                 <fields oils_persist:primary="code">
1563                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1564                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1565                 </fields>
1566                 <links/>
1567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1568             <actions>
1569                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1570                 <retrieve/>
1571                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1572                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1573             </actions>
1574         </permacrud>
1575         </class>
1576
1577         <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">
1578                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1579                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1580                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1581                 </fields>
1582                 <links/>
1583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1584             <actions>
1585                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1586                 <retrieve/>
1587                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1588                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1589             </actions>
1590         </permacrud>
1591         </class>
1592
1593         <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">
1594                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1595                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1596                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1597                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1598                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1599                 </fields>
1600         <links>
1601             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1602             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1603             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1604         </links>
1605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1606             <actions>
1607                 <create permission="UPDATE_COPY">
1608                     <context link="target_copy" field="circ_lib"/>
1609                 </create>
1610                 <retrieve/>
1611                 <update permission="UPDATE_COPY">
1612                     <context link="target_copy" field="circ_lib"/>
1613                 </update>
1614                 <delete permission="UPDATE_COPY">
1615                     <context link="target_copy" field="circ_lib"/>
1616                 </delete>
1617             </actions>
1618         </permacrud>
1619         </class>
1620
1621         <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">
1622                 <fields oils_persist:primary="code">
1623                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1624                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1625                 </fields>
1626                 <links/>
1627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1628             <actions>
1629                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1630                 <retrieve/>
1631                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1632                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1633             </actions>
1634         </permacrud>
1635         </class>
1636
1637         <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">
1638                 <fields oils_persist:primary="code">
1639                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1640                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1641                 </fields>
1642                 <links/>
1643         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1644             <actions>
1645                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1646                 <retrieve/>
1647                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1648                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1649             </actions>
1650         </permacrud>
1651         </class>
1652
1653         <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">
1654                 <fields oils_persist:primary="code">
1655                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1656                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1657                 </fields>
1658                 <links/>
1659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1660             <actions>
1661                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1662                 <retrieve/>
1663                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1664                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1665             </actions>
1666         </permacrud>
1667         </class>
1668
1669     <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">
1670         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1671             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1672             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1673             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1674             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1675             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1676             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1677             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1678             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1679             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1680             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1681             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1682             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1683             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1684             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1685             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1686             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1687             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1688         </fields>
1689         <links/>
1690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1691             <actions>
1692                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1693                 <retrieve/>
1694                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1695                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1696             </actions>
1697         </permacrud>
1698     </class>
1699
1700     <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">
1701         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1702             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1703             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1704             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1705             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1706             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1707             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1708             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1709             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1710             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1711             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1712             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1713             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1714             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1715             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1716             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1717             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1718             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1719             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1720             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1721         </fields>
1722         <links/>
1723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1724             <actions>
1725                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1726                 <retrieve/>
1727                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1728                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1729             </actions>
1730         </permacrud>
1731     </class>
1732
1733     <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">
1734         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1735             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1736             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1737             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1738             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1739             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1740         </fields>
1741         <links>
1742             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1743             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1744             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1745         </links>
1746         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1747             <actions>
1748                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1749                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1750                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1751                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1752             </actions>
1753         </permacrud>
1754     </class>
1755
1756         <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">
1757                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1758                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1759                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1760                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1761                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1762                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1763                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1764                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1765                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1766                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1767                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1768                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1769                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1770                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1771                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1772                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1773                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1774             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1775                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1776                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1777                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1778                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1779                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1780                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1781                 </fields>
1782                 <links>
1783                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1784                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1785                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1786                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1787                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1788                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1789                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1790                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1791                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1792                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1793                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1794                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1795                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1796             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1797                 </links>
1798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1799             <actions>
1800                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1801                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1802                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1803                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1804             </actions>
1805         </permacrud>
1806         </class>
1807
1808         <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">
1809                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1810                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1811                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1812                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1813                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1814                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1815                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1816                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1817                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1818                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1819                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1820                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1821                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1822                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1823                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1824                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1825             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1826                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1827                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1828             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1829                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1830                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1831                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1832                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1833             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1834             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1835             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1836                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1837                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1838                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1839                 </fields>
1840                 <links>
1841                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1842                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1843                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1844                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1845                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1846                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1847                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1848                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1849                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1850                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1851                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1852                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1853                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1854                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1855             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1856                 </links>
1857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1858             <actions>
1859                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1860                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1861                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1862                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1863             </actions>
1864         </permacrud>
1865         </class>
1866
1867     <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">
1868         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1869             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1870             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1871             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1872         </fields>
1873         <links/>
1874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1875             <actions>
1876                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1877                 <retrieve/>
1878                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1879                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1880             </actions>
1881         </permacrud>
1882     </class>
1883
1884     <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">
1885         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1886             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1887             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1888             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1889             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1890             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1891             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1892             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1893         </fields>
1894         <links>
1895             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1896         </links>
1897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1898             <actions>
1899                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1900                 <retrieve/>
1901                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1902                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1903             </actions>
1904         </permacrud>
1905     </class>
1906
1907     <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">
1908         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1909             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1910             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1911             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1912             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1913             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1914         </fields>
1915         <links>
1916             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1917             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1918         </links>
1919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1920             <actions>
1921                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1922                     <context link="matchpoint" field="org_unit"/>
1923                 </create>
1924                 <retrieve/>
1925                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1926                     <context link="matchpoint" field="org_unit"/>
1927                 </update>
1928                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1929                     <context link="matchpoint" field="org_unit"/>
1930                 </delete>
1931             </actions>
1932         </permacrud>
1933     </class>
1934
1935     <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">
1936         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1937             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1938             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1939             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1940         </fields>
1941         <links>
1942             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1943             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1944         </links>
1945         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1946             <actions>
1947                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1948                     <context link="limit_set" field="owning_lib"/>
1949                 </create>
1950                 <retrieve/>
1951                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1952                     <context link="limit_set" field="owning_lib"/>
1953                 </update>
1954                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1955                     <context link="limit_set" field="owning_lib"/>
1956                 </delete>
1957             </actions>
1958         </permacrud>
1959     </class>
1960     <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">
1961         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1962             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1963             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1964             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1965         </fields>
1966         <links>
1967             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1968             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1969         </links>
1970         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1971             <actions>
1972                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1973                     <context link="limit_set" field="owning_lib"/>
1974                 </create>
1975                 <retrieve/>
1976                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1977                     <context link="limit_set" field="owning_lib"/>
1978                 </update>
1979                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1980                     <context link="limit_set" field="owning_lib"/>
1981                 </delete>
1982             </actions>
1983         </permacrud>
1984     </class>
1985
1986     <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">
1987         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1988             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1989             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1990             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1991             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1992         </fields>
1993         <links>
1994             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1995             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1996         </links>
1997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1998             <actions>
1999                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2000                     <context link="limit_set" field="owning_lib"/>
2001                 </create>
2002                 <retrieve/>
2003                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2004                     <context link="limit_set" field="owning_lib"/>
2005                 </update>
2006                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2007                     <context link="limit_set" field="owning_lib"/>
2008                 </delete>
2009             </actions>
2010         </permacrud>
2011     </class>
2012
2013         <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">
2014                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2015                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2016                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2017                 </fields>
2018                 <links/>
2019         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2020             <actions>
2021                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2022                 <retrieve/>
2023                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2024                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2025             </actions>
2026         </permacrud>
2027         </class>
2028
2029         <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">
2030                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2031                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2032                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2033                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2034                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2035                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2036                 </fields>
2037                 <links>
2038                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2039                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2040                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2041                 </links>
2042         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2043             <actions>
2044                 <create permission="ADMIN_SURVEY">
2045                     <context link="survey" field="owner"/>
2046                 </create>
2047                 <retrieve/>
2048                 <update permission="ADMIN_SURVEY">
2049                     <context link="survey" field="owner"/>
2050                 </update>
2051                 <delete permission="ADMIN_SURVEY">
2052                     <context link="survey" field="owner"/>
2053                 </delete>
2054             </actions>
2055         </permacrud>
2056         </class>
2057         <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">
2058                 <fields oils_persist:primary="id" oils_persist:sequence="">
2059                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2060                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2061                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2062                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2063                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2064                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2065                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2066                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2067                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2068                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2069                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2070                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2071                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2072                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2073                 </fields>
2074                 <links>
2075                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2076                 </links>
2077                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2078                         <actions>
2079                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2080                                         <context link="usr" field="home_ou" />
2081                                 </retrieve>
2082                         </actions>
2083                 </permacrud>
2084         </class>
2085         <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">
2086                 <fields oils_persist:primary="id" oils_persist:sequence="">
2087                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2088                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2089                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2090                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2091                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2092                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2093                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2094                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2095                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2096                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2097                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2098                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2099                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2100                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2101                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2102                 </fields>
2103                 <links>
2104                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2105                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2106                 </links>
2107         </class>
2108         <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">
2109                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2110                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2111                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2112                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2113                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2114                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2115                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2116                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2117                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2118                 </fields>
2119                 <links>
2120                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2121                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2122                 </links>
2123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2124                         <actions> <!-- created magically, so no create action -->
2125                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2126                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2127                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2128                         </actions>
2129                 </permacrud>
2130         </class>
2131         <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)">
2132                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2133                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2134                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2135                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2136                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2137                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2138                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2139                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2140                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2141                 </fields>
2142                 <links>
2143                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2144                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2145                 </links>
2146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2147                         <actions> <!-- created magically, so no create action -->
2148                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2149                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2150                         </actions>
2151                 </permacrud>
2152         </class>
2153         <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">
2154                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2155                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2156                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2157                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2158                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2159                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2160                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2161                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2162                 </fields>
2163                 <links>
2164                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2165                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2166                 </links>
2167         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2168             <actions>
2169                 <create permission="UPDATE_USER" context_field="owner">
2170                     <context link="usr" field="home_ou"/>
2171                 </create>
2172                                 <!-- note: public notes are still accessible via API -->
2173                 <retrieve permission="UPDATE_USER">
2174                     <context link="usr" field="home_ou"/>
2175                                 </retrieve>
2176                 <update permission="UPDATE_USER">
2177                     <context link="usr" field="home_ou"/>
2178                                 </update>
2179                 <delete permission="UPDATE_USER">
2180                     <context link="usr" field="home_ou"/>
2181                                 </delete>
2182             </actions>
2183         </permacrud>
2184         </class>
2185         <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">
2186                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2187                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2188                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2189                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2190                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2191                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2192                 </fields>
2193                 <links>
2194                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2195                 </links>
2196         </class>
2197         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2198                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2199                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2200                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2201                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2202                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2203                 </fields>
2204                 <links>
2205                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2206                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2207                 </links>
2208         </class>
2209         <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">
2210                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2211                         <field name="field" reporter:datatype="link"/>
2212                         <field name="id" reporter:datatype="id" />
2213                         <field name="source" reporter:datatype="link"/>
2214                         <field name="value" reporter:datatype="text"/>
2215                 </fields>
2216                 <links>
2217                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2218                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2219                 </links>
2220         </class>
2221         <class id="aihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::in_house_use" oils_persist:tablename="action.in_house_use" reporter:core="true" reporter:label="In House Use">
2222                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2223                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2224                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2225                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2226                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2227                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2228                 </fields>
2229                 <links>
2230                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2231                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2232                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2233                 </links>
2234         </class>
2235         <class id="ancihu" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cat_in_house_use" oils_persist:tablename="action.non_cat_in_house_use" reporter:core="true" reporter:label="Non-cataloged In House Use">
2236                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2237                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2238                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2239                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2240                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2241                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2242                 </fields>
2243                 <links>
2244                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2245                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2246                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2247                 </links>
2248         </class>
2249         <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">
2250                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2251                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2252                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2253                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2254                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2255                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2256                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2257                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2258                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2259                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2260                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2261                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2262                 </fields>
2263                 <links>
2264                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2265                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2266                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2267                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2268                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2269                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2270                 </links>
2271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2272             <actions>
2273                 <create permission="TRANSIT_COPY" context_field="owner">
2274                     <context link="target_copy" field="circ_lib"/>
2275                 </create>
2276                 <retrieve/>
2277                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2278                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2279             </actions>
2280         </permacrud>
2281         </class>
2282         <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">
2283                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2284                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2285                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2286                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2287                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2288                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2289                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2290                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2291                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2292                 </fields>
2293                 <links>
2294                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2295                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2296                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2297                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2298                 </links>
2299         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2300             <actions>
2301                 <create permission="ADMIN_SURVEY">
2302                     <context link="survey" field="owner"/>
2303                 </create>
2304                 <retrieve permission="VIEW_USER">
2305                     <context link="usr" field="home_ou"/>
2306                 </retrieve>
2307                 <update permission="ADMIN_SURVEY">
2308                     <context link="survey" field="owner"/>
2309                 </update>
2310                 <delete permission="ADMIN_SURVEY">
2311                     <context link="survey" field="owner"/>
2312                 </delete>
2313             </actions>
2314         </permacrud>
2315         </class>
2316         <class id="ccbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
2317                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2318                         <field name="bucket" />
2319                         <field name="id" reporter:datatype="id" />
2320                         <field name="target_copy" reporter:datatype="link"/>
2321                         <field name="create_time" reporter:datatype="timestamp" />
2322                         <field name="pos" reporter:datatype="int" />
2323                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2324                 </fields>
2325                 <links>
2326                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2327                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2328             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2329                 </links>
2330         </class>
2331         <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">
2332                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2333                         <field name="id" reporter:datatype="id" />
2334                         <field name="item" reporter:datatype="link"/>
2335                         <field name="note" reporter:datatype="text" />
2336                 </fields>
2337                 <links>
2338                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2339                 </links>
2340         </class>
2341
2342         <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">
2343                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2344                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2345                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2346                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2347                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2348                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2349                 </fields>
2350                 <links>
2351                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2352                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2353                 </links>
2354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2355                         <actions>
2356                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2357                                 <retrieve/>
2358                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2359                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2360                         </actions>
2361                 </permacrud>
2362         </class>
2363
2364         <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">
2365                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2366                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2367                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2368                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2369                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2370                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2371                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2372                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2373                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2374                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2375                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2376                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2377                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2378                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2379                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2380                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2381                 </fields>
2382                 <links>
2383                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2384                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2385                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2386                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2387                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2388                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2389                 </links>
2390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2391                         <actions>
2392                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2393                                 <retrieve/>
2394                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2395                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2396                         </actions>
2397                 </permacrud>
2398         </class>
2399
2400         <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">
2401                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2402                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2403                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2404                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2405                 </fields>
2406                 <links>
2407                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2408                 </links>
2409                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2410                         <actions>
2411                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2412                                 <retrieve/>
2413                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2414                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2415                         </actions>
2416                 </permacrud>
2417         </class>
2418
2419         <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">
2420                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2421                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2422                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2423                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2424                 </fields>
2425                 <links>
2426                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2427                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2428                 </links>
2429                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2430                         <actions>
2431                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2432                                 <retrieve/>
2433                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2434                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2435                         </actions>
2436                 </permacrud>
2437         </class>
2438
2439         <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">
2440                 <fields oils_persist:primary="code">
2441                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2442                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2443                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2444                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2445                 </fields>
2446                 <links>
2447                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2448                 </links>
2449                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2450                         <actions>
2451                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2452                                 <retrieve/>
2453                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2454                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2455                         </actions>
2456                 </permacrud>
2457         </class>
2458
2459         <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">
2460                 <fields oils_persist:primary="code">
2461                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2462                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2463                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2464                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2465                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2466                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2467                 </fields>
2468                 <links>
2469                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2470                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2471                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2472                 </links>
2473                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2474                         <actions>
2475                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2476                                 <retrieve/>
2477                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2478                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2479                         </actions>
2480                 </permacrud>
2481         </class>
2482
2483     <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">
2484         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2485             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2486             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2487             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2488         </fields>
2489         <links>
2490             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2491             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2492         </links>
2493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2494             <actions>
2495                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2496                 <retrieve/>
2497                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2498                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2499             </actions>
2500         </permacrud>
2501     </class>
2502
2503         <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">
2504                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2505                         <field name="active" reporter:datatype="bool"/>
2506                         <field name="create_date" reporter:datatype="timestamp"/>
2507                         <field name="creator" />
2508                         <field name="deleted" reporter:datatype="bool"/>
2509                         <field name="edit_date" reporter:datatype="timestamp"/>
2510                         <field name="editor" />
2511                         <field name="id" reporter:datatype="id" />
2512                         <field name="last_xact_id" />
2513                         <field name="marc" />
2514                         <field name="source" />
2515                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2516                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2517                         <field name="heading" />
2518                         <field name="simple_heading" />
2519                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2520                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2521                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2522                 </fields>
2523                 <links>
2524                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2525                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2526                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2527                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2528                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2529                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2530                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2531                 </links>
2532                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2533                         <actions>
2534                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2535                                 <retrieve/>
2536                                 <update permission="UPDATE_MARC" global_required="true"/>
2537                                 <delete permission="UPDATE_MARC" global_required="true"/>
2538                         </actions>
2539                 </permacrud>
2540         </class>
2541         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2542                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2543                         <field name="char_encoding" />
2544                         <field name="id" />
2545                         <field name="record" />
2546                         <field name="record_status" />
2547                         <field name="thesaurus" />
2548                 </fields>
2549                 <links>
2550                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2551                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2552                 </links>
2553         </class>
2554         <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">
2555                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2556                         <field name="id" reporter:datatype="id" />
2557                         <field name="bib" reporter:datatype="link" />
2558                         <field name="authority" reporter:datatype="link" />
2559                 </fields>
2560                 <links>
2561                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2562                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2563                 </links>
2564         </class>
2565         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2566                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2567                         <field name="id" reporter:datatype="id" />
2568                         <field name="record" reporter:datatype="link" />
2569                         <field name="atag" reporter:datatype="link" />
2570                         <field name="value" reporter:datatype="text" />
2571                 </fields>
2572                 <links>
2573                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2574                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2575                 </links>
2576         </class>
2577         <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">
2578                 <fields oils_persist:primary="code" oils_persist:sequence="">
2579                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2580                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2581                 </fields>
2582                 <links/>
2583         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2584             <actions>
2585                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2586                 <retrieve/>
2587                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2588                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2589             </actions>
2590         </permacrud>
2591         </class>
2592         <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">
2593                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2594                         <field name="accepting_usr" />
2595                         <field name="amount" reporter:datatype="money" />
2596                         <field name="amount_collected" reporter:datatype="money" />
2597                         <field name="approval_code" reporter:datatype="text"/>
2598                         <field name="cash_drawer" reporter:datatype="link"/>
2599                         <field name="cc_number" reporter:datatype="text"/>
2600                         <field name="cc_order_number" reporter:datatype="text"/>
2601                         <field name="cc_processor" reporter:datatype="text"/>
2602                         <field name="id" reporter:datatype="id" />
2603                         <field name="note" reporter:datatype="text"/>
2604                         <field name="payment_ts" reporter:datatype="timestamp"/>
2605                         <field name="xact" reporter:datatype="link"/>
2606                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2607                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2608                 </fields>
2609                 <links>
2610                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2611                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2612                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2613                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2614                 </links>
2615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2616             <actions>
2617                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2618                     <context link="xact" jump="usr" field="home_ou"/>
2619                 </retrieve>
2620                         </actions>
2621                 </permacrud>
2622         </class>
2623         <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">
2624                 <fields oils_persist:primary="name">
2625                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2626                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2627                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2628                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2629                 </fields>
2630                 <links/>
2631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2632             <actions>
2633                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2634                 <retrieve/>
2635                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2636                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2637             </actions>
2638         </permacrud>
2639         </class>
2640
2641         <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">
2642                 <fields oils_persist:primary="alias">
2643                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2644                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2645                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2646                 </fields>
2647                 <links>
2648                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2649                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2650                 </links>
2651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2652             <actions>
2653                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2654                 <retrieve/>
2655                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2656                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2657             </actions>
2658         </permacrud>
2659         </class>
2660
2661         <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">
2662                 <fields oils_persist:primary="name">
2663                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2664                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2665                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2666                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2667                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2668                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2669                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2670                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2671                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2672                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2673                 </fields>
2674                 <links>
2675                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2676                 </links>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2680                 <retrieve/>
2681                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2682                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2683             </actions>
2684         </permacrud>
2685         </class>
2686
2687         <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">
2688                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2689                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2690                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2691                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2692                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2693                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2694                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2695                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2696                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2697                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2698                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2699                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2700                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2701                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2702                 </fields>
2703                 <links>
2704                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2705                 </links>
2706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2707             <actions>
2708                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2709                 <retrieve/>
2710                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2711                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2712             </actions>
2713         </permacrud>
2714         </class>
2715         <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">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2717                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2718                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2719                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2720                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2721                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2722                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2723                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2724                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2725                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2726                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2727                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2728                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2729                 </fields>
2730                 <links>
2731                 </links>
2732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2733                         <actions>
2734                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2735                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2736                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2737                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2738                         </actions>
2739                 </permacrud>
2740         </class>
2741         <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">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2743                         <field name="id" reporter:datatype="id" />
2744                         <field name="name" reporter:datatype="text"/>
2745                         <field name="xpath" reporter:datatype="text"/>
2746                         <field name="format" reporter:datatype="link"/>
2747                         <field name="first_word" reporter:datatype="bool" />
2748                 </fields>
2749                 <links/>
2750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2751             <actions>
2752                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2753                 <retrieve/>
2754                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2755                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2756             </actions>
2757         </permacrud>
2758         </class>
2759         <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">
2760                 <fields oils_persist:primary="code" oils_persist:sequence="">
2761                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2762                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2763                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2764                 </fields>
2765                 <links/>
2766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2767             <actions>
2768                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2769                 <retrieve/>
2770                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2771                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2772             </actions>
2773         </permacrud>
2774         </class>
2775         <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">
2776                 <fields oils_persist:primary="code" oils_persist:sequence="">
2777                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2778                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2779                 </fields>
2780                 <links/>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2784                 <retrieve/>
2785                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2786                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2787             </actions>
2788         </permacrud>
2789         </class>
2790     <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">
2791         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2792             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2793             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2794             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2795             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2796         </fields>
2797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2798             <actions>
2799                 <retrieve/>
2800             </actions>
2801         </permacrud>
2802     </class>
2803         <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">
2804                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2805                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2806                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2807                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2808                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2809                 </fields>
2810                 <links>
2811                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2812                 </links>
2813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2814             <actions>
2815                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2816                 <retrieve/>
2817                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2818                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2819             </actions>
2820         </permacrud>
2821         </class>
2822         <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">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2824                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2825                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2826                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2827                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2828                 </fields>
2829                 <links>
2830                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2831                 </links>
2832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2833             <actions>
2834                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2835                 <retrieve/>
2836                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2837                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2838             </actions>
2839         </permacrud>
2840         </class>
2841         <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">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2843                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2844                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2845                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2846                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2847                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2848                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2849                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2850                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2851                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2852                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2853                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2854                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2855                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2856                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2857                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2858                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2859                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2860                 </fields>
2861                 <links>
2862                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2863                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2864                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2865                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2866                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2867                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2868                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2869                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2870                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2871                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2872                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2873                 </links>
2874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875             <actions>
2876                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2877                 <retrieve/>
2878                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2879                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2880             </actions>
2881         </permacrud>
2882         </class>
2883         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2885                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2886                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2887                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2888                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2889                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2890                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2891                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2892                 </fields>
2893                 <links>
2894                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2895                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2896         </links>
2897         </class>
2898         <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">
2899                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2901                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2902                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2903                 </fields>
2904                 <links>
2905                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2906                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2907                 </links>
2908         </class>
2909         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2911                         <field name="id" reporter:datatype="id" />
2912                         <field name="value" oils_persist:i18n="true" />
2913                 </fields>
2914                 <links/>
2915         </class>
2916         <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">
2917                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2918                         <field name="balance_owed" reporter:datatype="money" />
2919                         <field name="total_owed" reporter:datatype="money" />
2920                         <field name="total_paid" reporter:datatype="money" />
2921                         <field name="usr" reporter:datatype="link"/>
2922                 </fields>
2923                 <links>
2924                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2925         </links>
2926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2927             <actions>
2928                 <retrieve permission="VIEW_USER">
2929                     <context link="usr" field="home_ou"/>
2930                 </retrieve>
2931             </actions>
2932         </permacrud>
2933         </class>
2934         <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">
2935                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2936                         <field name="collector" />
2937                         <field name="enter_time" reporter:datatype="timestamp"/>
2938                         <field name="id" reporter:datatype="id" />
2939                         <field name="location" reporter:datatype="link"/>
2940                         <field name="usr" reporter:datatype="link"/>
2941                 </fields>
2942                 <links>
2943                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2944                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2945                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2946                 </links>
2947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2948             <actions>
2949                 <create permission="money.collections_tracker.create" context_field="location"/>
2950                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2951                 <delete permission="money.collections_tracker.create" context_field="location"/>
2952             </actions>
2953         </permacrud>
2954         </class>
2955         <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">
2956                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2957                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2960                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2961                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2962                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2963                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2964                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2965                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2966                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2967                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2968                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2969                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2970                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2971                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2972                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2973                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2974                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2975                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2979                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2980                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2981                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2982                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2984                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2985                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2986                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2987                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2988                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2989                         <field reporter:label="MVF Attributes" name="mattrs" oils_persist:virtual="true" reporter:datatype="link"/>
2990                 </fields>
2991                 <links>
2992                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2993                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2994                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2995                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2996                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2997                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2998                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2999                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
3000                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3001                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3002                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3003                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3004                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3005                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3006                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3007                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3008                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3009                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3010                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3011                         <link field="mattrs" reltype="might_have" key="id" map="" class="mraf"/>
3012                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3013                 </links>
3014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3015             <actions>
3016                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3017                 <retrieve/>
3018                 <update permission="UPDATE_MARC" global_required="true"/>
3019                 <!-- 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. -->
3020                 <delete permission="DELETE_RECORD" global_required="true"/>
3021             </actions>
3022         </permacrud>
3023         </class>
3024         <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">
3025                 <fields oils_persist:primary="id">
3026                         <field name="dow_0_close" />
3027                         <field name="dow_0_open" />
3028                         <field name="dow_1_close" />
3029                         <field name="dow_1_open" />
3030                         <field name="dow_2_close" />
3031                         <field name="dow_2_open" />
3032                         <field name="dow_3_close" />
3033                         <field name="dow_3_open" />
3034                         <field name="dow_4_close" />
3035                         <field name="dow_4_open" />
3036                         <field name="dow_5_close" />
3037                         <field name="dow_5_open" />
3038                         <field name="dow_6_close" />
3039                         <field name="dow_6_open" />
3040                         <field name="id" reporter:datatype="id" />
3041                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3042                 </fields>
3043                 <links>
3044                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3045                 </links>
3046         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3047             <actions>
3048                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3049                 <retrieve/>
3050                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3051                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3052             </actions>
3053         </permacrud>
3054         </class>
3055         <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">
3056                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3057                         <field name="id" reporter:datatype="id" />
3058                         <field name="record" reporter:datatype="link"/>
3059                         <field name="label" reporter:datatype="text"/>
3060                         <field name="label_sortkey" reporter:datatype="text"/>
3061                         <field name="deleted" reporter:datatype="bool"/>
3062                 </fields>
3063                 <links>
3064                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3065                 </links>
3066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3067             <actions>
3068                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3069                 <retrieve/>
3070                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3071                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3072             </actions>
3073         </permacrud>
3074         </class>
3075         <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">
3076                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3077                         <field name="id" reporter:datatype="id" />
3078                         <field name="target_copy" reporter:datatype="link" />
3079                         <field name="part" reporter:datatype="link"/>
3080                 </fields>
3081                 <links>
3082                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3083                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3084                 </links>
3085         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3086             <actions>
3087                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3088                 <retrieve/>
3089                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3090                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3091             </actions>
3092         </permacrud>
3093         </class>
3094         <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">
3095                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3096                         <field name="close_end" reporter:datatype="timestamp" />
3097                         <field name="close_start" reporter:datatype="timestamp" />
3098                         <field name="id" reporter:datatype="id" />
3099                         <field name="org_unit" reporter:datatype="org_unit"/>
3100                         <field name="reason" reporter:datatype="text"/>
3101                 </fields>
3102                 <links>
3103                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3104                 </links>
3105         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3106             <actions>
3107                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3108                 <retrieve/>
3109                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3110                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3111             </actions>
3112         </permacrud>
3113         </class>
3114         <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">
3115                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3116                         <field name="extended" reporter:datatype="interval"/>
3117                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3118                         <field name="max_renewals" reporter:datatype="int" />
3119                         <field name="name" reporter:datatype="text"/>
3120                         <field name="normal" reporter:datatype="interval"/>
3121                         <field name="shrt" reporter:datatype="interval"/>
3122                 </fields>
3123                 <links>
3124                 </links>
3125         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3126             <actions>
3127                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3128                 <retrieve/>
3129                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3130                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3131             </actions>
3132         </permacrud>
3133         </class>
3134
3135         <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">
3136                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3137                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3138                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3139             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3140                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3141             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3142                 </fields>
3143                 <links>
3144             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3145                 </links>
3146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3147             <actions>
3148                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3149                 <retrieve/>
3150                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3151                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3152             </actions>
3153                 </permacrud>
3154         </class>
3155
3156         <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">
3157                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3158                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3159                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3160                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3161             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3162                 </fields>
3163                 <links>
3164                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3165                 </links>
3166                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3167             <actions>
3168                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3169                 <retrieve/>
3170                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3171                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3172             </actions>
3173                 </permacrud>
3174         </class>
3175
3176         <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">
3177                 <fields oils_persist:primary="id" oils_persist:sequence="">
3178                         <field name="balance_owed" reporter:datatype="money"/>
3179                         <field name="id" reporter:datatype="id" />
3180                         <field name="last_billing_note" reporter:datatype="text"/>
3181                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3182                         <field name="last_billing_type" reporter:datatype="text"/>
3183                         <field name="last_payment_note" reporter:datatype="text"/>
3184                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3185                         <field name="last_payment_type" reporter:datatype="text"/>
3186                         <field name="total_owed" reporter:datatype="money"/>
3187                         <field name="total_paid" reporter:datatype="money"/>
3188                         <field name="usr" reporter:datatype="link"/>
3189                         <field name="xact_finish" reporter:datatype="timestamp" />
3190                         <field name="xact_start" reporter:datatype="timestamp" />
3191                         <field name="xact_type" reporter:datatype="text"/>
3192                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3195                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3196                         <field name="billing_location" reporter:datatype="link"/>
3197                 </fields>
3198                 <links>
3199                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3200                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3201                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3202                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3203                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3204                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3205                 </links>
3206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3207                         <actions>
3208                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3209                                         <context link="usr" field="home_ou" />
3210                                 </retrieve>
3211                         </actions>
3212                 </permacrud>
3213         </class>
3214         <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">
3215                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3216                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3219                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3220                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3221                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3222                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3223                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3224                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3225                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3226                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3227                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3228                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3229                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3230                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3231                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3232                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3233                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3234                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3235                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3236                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3237                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3238                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3239                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3240                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3241                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3242                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3243                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3244                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3245                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3246                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3247                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3248                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3249                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3250                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3251                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3252                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3253                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3254                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3255                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3256                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3257                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3258                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3259                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3260                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3261                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3262                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3263                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3264                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3265                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3266                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3267                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3268                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3269                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3272                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3274                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3275                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3276                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3277                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3278                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3279                 </fields>
3280                 <links>
3281                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3282                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3283                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3284                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3285                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3286                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3287                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3288                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3289                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3290                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3291                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3292                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3293                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3294                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3295                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3296                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3297                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3298                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3299                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3300                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3301                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3302                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3303                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3304                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3305                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3306                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3307                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3308                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3309                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3310                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3311                 </links>
3312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3313                         <actions>
3314                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3315                         </actions>
3316                 </permacrud>
3317         </class>
3318         <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">
3319                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3320                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3321                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3322                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3323                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3324                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3325                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3326                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3327                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3328         </fields>
3329                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3330                         <actions>
3331                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3332                                 <retrieve/>
3333                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3334                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3335                         </actions>
3336                 </permacrud>
3337         </class>
3338         <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">
3339                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3340                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3341                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3342                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3343                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3344         </fields>
3345         <links>
3346                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3347                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3348                 </links>
3349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3350                         <actions>
3351                                 <retrieve permission="RUN_REPORTS">
3352                                         <context link="usr" field="home_ou" />
3353                                 </retrieve>
3354                         </actions>
3355                 </permacrud>
3356         </class>
3357         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3358                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3359                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3360                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3361                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3362                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3363                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3364                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3365         </fields>
3366         <links>
3367                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3368                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3369                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3370                 </links>
3371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3372                         <actions>
3373                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3374                                         <context link="usr" field="home_ou" />
3375                                         <context link="ws" field="owning_lib" />
3376                                 </retrieve>
3377                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3378                                         <context link="usr" field="home_ou" />
3379                                         <context link="ws" field="owning_lib" />
3380                                 </create>
3381                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3382                                         <context link="usr" field="home_ou" />
3383                                         <context link="ws" field="owning_lib" />
3384                                 </update>
3385                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3386                                         <context link="usr" field="home_ou" />
3387                                         <context link="ws" field="owning_lib" />
3388                                 </delete>
3389                         </actions>
3390                 </permacrud>
3391         </class>
3392         <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">
3393                 <fields oils_persist:primary="name">
3394                         <field name="name" reporter:datatype="text"/>
3395                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3396                 </fields>
3397                 <links/>
3398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3399                         <actions>
3400                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3401                                 <retrieve/>
3402                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3403                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3404                         </actions>
3405                 </permacrud>
3406         </class>
3407         <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">
3408                 <fields oils_persist:primary="name">
3409                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3410                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3411                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3412                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3413                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3414                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3415                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3416                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3417                 </fields>
3418                 <links>
3419                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3420                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3421                 </links>
3422                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3423                         <actions>
3424                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3425                                 <retrieve/>
3426                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3427                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3428                         </actions>
3429                 </permacrud>
3430         </class>
3431         <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">
3432                 <fields oils_persist:primary="name">
3433                         <field name="name" reporter:datatype="text"/>
3434                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3435                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3436                         <field name="datatype" reporter:datatype="text"/>
3437                         <field name="view_perm" reporter:datatype="link"/>
3438                         <field name="update_perm" reporter:datatype="link"/>
3439                         <field name="fm_class" reporter:datatype="text"/>
3440                         <field name="grp" reporter:datatype="link"/>
3441                 </fields>
3442                 <links>
3443                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3444                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3445                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3446                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3447                 </links>
3448                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3449                         <actions>
3450                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3451                                 <retrieve/>
3452                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3453                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3454                         </actions>
3455                 </permacrud>
3456         </class>
3457         <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">
3458                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3459                         <field name="id" />
3460                         <field name="name"  reporter:datatype="text"/>
3461                         <field name="org_unit" reporter:datatype="org_unit"/>
3462                         <field name="value"  reporter:datatype="text"/>
3463                 </fields>
3464                 <links>
3465                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3466                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3467                 </links>
3468         </class>
3469         <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">
3470                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3471                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3472                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3473                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3474                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3475                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3476                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3477                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3478                 </fields>
3479                 <links>
3480                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3481                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3482                 </links>
3483         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3484             <actions>
3485                 <create permission="CREATE_COPY_NOTE">
3486                     <context link="owning_copy" field="circ_lib"/>
3487                 </create>
3488                 <retrieve permission="VIEW_COPY_NOTES">
3489                     <context link="owning_copy" field="circ_lib"/>
3490                 </retrieve>
3491                 <update permission="UPDATE_COPY_NOTE">
3492                     <context link="owning_copy" field="circ_lib"/>
3493                 </update>
3494                 <delete permission="DELETE_COPY_NOTE">
3495                     <context link="owning_copy" field="circ_lib"/>
3496                 </delete>
3497             </actions>
3498         </permacrud>
3499         </class>
3500         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3501                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3502                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3503                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3504                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3505                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3506                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3507                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3508                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3509                 </fields>
3510                 <links>
3511                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3512                 </links>
3513         </class>
3514         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3515                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3516                         <field name="fingerprint"  reporter:datatype="text"/>
3517                         <field name="id" reporter:datatype="id" />
3518                         <field name="master_record" reporter:datatype="link"/>
3519                         <field name="mods"  reporter:datatype="text"/>
3520                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3521                 </fields>
3522                 <links>
3523                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3524                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3525                 </links>
3526         </class>
3527         <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">
3528                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3529                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3530                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3531                 </fields>
3532                 <links/>
3533         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3534             <actions>
3535                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3536                 <retrieve/>
3537                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3538                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3539             </actions>
3540         </permacrud>
3541         </class>
3542         <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">
3543                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3544                         <field name="code"  reporter:datatype="text"/>
3545                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3546                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3547                 </fields>
3548                 <links/>
3549         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3550             <actions>
3551                 <create permission="CREATE_PERM" global_required="true"/>
3552                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3553                 <update permission="UPDATE_PERM" global_required="true"/>
3554                 <delete permission="DELETE_PERM" global_required="true"/>
3555             </actions>
3556         </permacrud>
3557         </class>
3558         <class id="mmrsm" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord_source_map" oils_persist:tablename="metabib.metarecord_source_map" oils_persist:field_safe="true" reporter:label="Metarecord Source Map">
3559                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3560                         <field name="id" reporter:datatype="id" />
3561                         <field name="metarecord" reporter:datatype="link"/>
3562                         <field name="source" reporter:datatype="link"/>
3563                 </fields>
3564                 <links>
3565                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3566                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3567                 </links>
3568         </class>
3569         <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">
3570                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3571                         <field name="id" reporter:datatype="id" />
3572                         <field name="field" reporter:datatype="link"/>
3573                         <field name="source" reporter:datatype="link"/>
3574                         <field name="value"  reporter:datatype="text"/>
3575                 </fields>
3576                 <links>
3577                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3578                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3579                 </links>
3580         </class>
3581         <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">
3582                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3583                         <field name="id" reporter:datatype="id" />
3584                         <field name="value" reporter:datatype="text"/>
3585                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3586                 </fields>
3587                 <links>
3588                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3589                 </links>
3590         </class>
3591         <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">
3592                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3593                         <field name="id" reporter:datatype="id" />
3594                         <field name="entry" reporter:datatype="link"/>
3595                         <field name="def" reporter:datatype="link"/>
3596                         <field name="source" reporter:datatype="link"/>
3597                 </fields>
3598                 <links>
3599                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3600                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3601                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3602                 </links>
3603         </class>
3604         <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">
3605                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3606                         <field name="id" reporter:datatype="id" />
3607                         <field name="entry" reporter:datatype="link"/>
3608                         <field name="simple_heading" reporter:datatype="link"/>
3609                 </fields>
3610                 <links>
3611                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3612                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3613                 </links>
3614         </class>
3615         <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">
3616                 <oils_persist:source_definition>
3617                         SELECT * FROM metabib.author_field_entry
3618                                                 UNION ALL
3619                         SELECT * FROM metabib.keyword_field_entry
3620                                                 UNION ALL
3621                         SELECT * FROM metabib.identifier_field_entry
3622                                                 UNION ALL
3623                         SELECT * FROM metabib.title_field_entry
3624                                                 UNION ALL
3625                         SELECT * FROM metabib.subject_field_entry
3626                                                 UNION ALL
3627                         SELECT * FROM metabib.series_field_entry
3628                 </oils_persist:source_definition>
3629                 <fields>
3630                         <field name="field" reporter:datatype="link"/>
3631                         <field name="id" reporter:datatype="id" />
3632                         <field name="source" reporter:datatype="link"/>
3633                         <field name="value"  reporter:datatype="text"/>
3634                 </fields>
3635                 <links>
3636                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3637                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3638                 </links>
3639         </class>
3640         <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">
3641                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3642                         <field name="field" reporter:datatype="link"/>
3643                         <field name="id" reporter:datatype="id" />
3644                         <field name="source" reporter:datatype="link"/>
3645                         <field name="value"  reporter:datatype="text"/>
3646                 </fields>
3647                 <links>
3648                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3649                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3650                 </links>
3651         </class>
3652         <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">
3653                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3654                         <field name="accepting_usr" reporter:datatype="link"/>
3655                         <field name="amount" reporter:datatype="money" />
3656                         <field name="amount_collected" reporter:datatype="money" />
3657                         <field name="cash_drawer" reporter:datatype="link"/>
3658                         <field name="id" reporter:datatype="id" />
3659                         <field name="note"  reporter:datatype="text"/>
3660                         <field name="payment_ts" reporter:datatype="timestamp"/>
3661                         <field name="xact" reporter:datatype="link"/>
3662                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3663                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3664                 </fields>
3665                 <links>
3666                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3667                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3668                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3669                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3670                 </links>
3671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3672             <actions>
3673                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3674                     <context link="xact" jump="usr" field="home_ou"/>
3675                 </retrieve>
3676                         </actions>
3677                 </permacrud>
3678         </class>
3679         <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">
3680                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3681                         <field name="accepting_usr" reporter:datatype="link"/>
3682                         <field name="amount" reporter:datatype="money" />
3683                         <field name="amount_collected" reporter:datatype="money" />
3684                         <field name="id" reporter:datatype="id" />
3685                         <field name="note"  reporter:datatype="text"/>
3686                         <field name="payment_ts" reporter:datatype="timestamp"/>
3687                         <field name="xact" reporter:datatype="link"/>
3688                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3689                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3690                 </fields>
3691                 <links>
3692                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3693                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3694                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3695                 </links>
3696         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3697             <actions>
3698                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3699                     <context link="xact" jump="usr" field="home_ou"/>
3700                 </retrieve>
3701                         </actions>
3702                 </permacrud>
3703         </class>
3704         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3705                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3706                         <field name="accepting_usr" reporter:datatype="link"/>
3707                         <field name="amount" reporter:datatype="money" />
3708                         <field name="amount_collected" reporter:datatype="money" />
3709                         <field name="id" reporter:datatype="id" />
3710                         <field name="note"  reporter:datatype="text"/>
3711                         <field name="payment_ts" reporter:datatype="timestamp"/>
3712                         <field name="xact" reporter:datatype="link"/>
3713                         <field name="billing" reporter:datatype="link"/>
3714                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3715                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3716                 </fields>
3717                 <links>
3718                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3719                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3720                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3721                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3722                 </links>
3723         </class>
3724         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3725                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3726                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3727                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3728                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3729                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3730                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3731                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3732                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3733                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3734                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3735                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3736                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3737                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3738                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3739                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3740                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3741                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3742                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3743                 </fields>
3744                 <links>
3745                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3746                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3747                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3748                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3749                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3750                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3751                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3752                 </links>
3753         </class>
3754
3755         <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">
3756                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3757                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3758                         <field name="name"  reporter:datatype="text"/>
3759                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3760                         <field name="block_list" reporter:datatype="text"/>
3761                         <field name="staff_alert" reporter:datatype="bool"/>
3762                         <field name="org_depth" reporter:datatype="int"/>
3763                         <field name="ignore_proximity" reporter:datatype="int"/>
3764                 </fields>
3765                 <links/>
3766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3767             <actions>
3768                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3769                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3770                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3771                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3772             </actions>
3773         </permacrud>
3774         </class>
3775         <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">
3776                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3777                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3778                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3779                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3780                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3781                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3782                 </fields>
3783                 <links>
3784                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3785                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3786                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3787         </links>
3788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3789             <actions>
3790                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3791                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3792                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3793                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3794             </actions>
3795         </permacrud>
3796         </class>
3797         <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">
3798                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3799                         <field name="holdable" reporter:datatype="bool"/>
3800                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3801                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3802                         <field name="opac_visible" reporter:datatype="bool"/>
3803             <field name="copy_active" reporter:datatype="bool"/>
3804             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3805                 </fields>
3806                 <links/>
3807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3808             <actions>
3809                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3810                 <retrieve/>
3811                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3812                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3813             </actions>
3814         </permacrud>
3815         </class>
3816         <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">
3817                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3818                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3819                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3820                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3821                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3822                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3823                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3824                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3825                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3826                 </fields>
3827                 <links>
3828                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3829                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3830                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3831                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3832                 </links>
3833                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3834                         <actions>
3835                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3836                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3837                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3838                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3839                         </actions>
3840                 </permacrud>
3841         </class>
3842         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3843                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3844                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3845                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3846                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3847                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3848                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3849                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3850                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3851                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3852                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3853                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3854                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3855                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3856                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3857                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3858                 </fields>
3859                 <links>
3860                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3861                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3862                 </links>
3863         </class>
3864         <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">
3865                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3866                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3867                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3868                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3869                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3870                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3871                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3872                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3873                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3874                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3875                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3876                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3877                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3878                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3879                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3880                 </fields>
3881                 <links>
3882                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3883                 </links>
3884                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3885                         <actions>
3886                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3887                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3888                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3889                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3890                         </actions>
3891                 </permacrud>
3892         </class>
3893
3894
3895         <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">
3896                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3897                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3898                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3899                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3900                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3901                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3902                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3903                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3904                 </fields>
3905                 <links>
3906                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3907                 </links>
3908         </class>
3909
3910         <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">
3911                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3912                         <field name="call_number" />
3913                         <field name="create_date" reporter:datatype="timestamp"/>
3914                         <field name="creator" reporter:datatype="link"/>
3915                         <field name="id" reporter:datatype="id" />
3916                         <field name="pub" reporter:datatype="bool"/>
3917                         <field name="title"  reporter:datatype="text"/>
3918                         <field name="value"  reporter:datatype="text"/>
3919                 </fields>
3920                 <links>
3921                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3922                 </links>
3923         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3924             <actions>
3925                 <create permission="CREATE_VOLUME_NOTE">
3926                     <context link="call_number" field="owning_lib"/>
3927                 </create>
3928                 <retrieve permission="VIEW_VOLUME_NOTES">
3929                     <context link="call_number" field="owning_lib"/>
3930                 </retrieve>
3931                 <update permission="UPDATE_VOLUME_NOTE">
3932                     <context link="call_number" field="owning_lib"/>
3933                 </update>
3934                 <delete permission="DELETE_VOLUME_NOTE">
3935                     <context link="call_number" field="owning_lib"/>
3936                 </delete>
3937             </actions>
3938         </permacrud>
3939         </class>
3940         <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">
3941                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3942                         <field name="create_date" reporter:datatype="timestamp"/>
3943                         <field name="creator" reporter:datatype="link"/>
3944                         <field name="edit_date" reporter:datatype="timestamp"/>
3945                         <field name="editor" reporter:datatype="link"/>
3946                         <field name="id" reporter:datatype="id" />
3947                         <field name="record" reporter:datatype="link"/>
3948                         <field name="value" reporter:datatype="text"/>
3949                 </fields>
3950                 <links>
3951                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3952                 </links>
3953         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3954             <actions>
3955                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3956                 <retrieve/>
3957                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3958                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3959             </actions>
3960         </permacrud>
3961         </class>
3962         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3963         <oils_persist:source_definition>
3964 SELECT  usr,
3965         SUM(
3966             CASE
3967                 WHEN (
3968                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3969                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3970                 ) THEN 1
3971                 ELSE 0
3972             END
3973         ) AS out,
3974
3975         SUM(
3976             CASE
3977                 WHEN (
3978                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3979                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3980                 ) THEN 1
3981                 ELSE 0
3982             END
3983         ) AS overdue,
3984
3985         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3986         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3987         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3988   FROM  action.circulation
3989   WHERE checkin_time IS NULL
3990   GROUP BY 1
3991         </oils_persist:source_definition>
3992         <fields oils_persist:primary="usr">
3993             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3994             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3995             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3996             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3997             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3998             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3999         </fields>
4000         <links>
4001             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4002         </links>
4003         </class>
4004         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4005         <oils_persist:source_definition>
4006 SELECT  usr,
4007         STRING_AGG(
4008             CASE
4009                 WHEN (
4010                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4011                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4012                 ) THEN id::TEXT
4013                 ELSE '0'
4014             END
4015         ,',') AS out,
4016
4017         STRING_AGG(
4018             CASE
4019                 WHEN (
4020                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4021                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4022                 ) THEN id::TEXT
4023                 ELSE '0'
4024             END
4025         ,',') AS overdue,
4026
4027         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4028         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4029         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4030   FROM  action.circulation
4031   WHERE checkin_time IS NULL
4032   GROUP BY 1
4033         </oils_persist:source_definition>
4034         <fields oils_persist:primary="usr">
4035             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4036             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4037             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4038             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4039             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4040             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4041         </fields>
4042         <links>
4043             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4044         </links>
4045         </class>
4046         <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">
4047                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4048                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4049                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4050                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4051                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4052                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4053                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4054                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4055                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4056                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4057                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4058                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4059                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4060                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4061                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4062                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4063                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4064                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4065                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4066                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4067                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4068                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4069                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4070                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4071                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4072                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4073                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4074                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4075                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4076                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4077                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4078                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4079                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4080                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4081                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4082                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4083                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4084                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4085                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4086                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4087                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4088                 </fields>
4089                 <links>
4090                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4091                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4092                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4093                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4094                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4095                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4096                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4097                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4098                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4099                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4100                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4101                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4102                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4103                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4104                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4105                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4106                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4107                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4108                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4109                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4110                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4111                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4112                 </links>
4113                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4114                         <actions>
4115                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4116                         </actions>
4117                 </permacrud>
4118         </class>
4119         <class id="combcirc" controller="open-ils.cstore" oils_obj:fieldmapper="action::all_circulation" oils_persist:tablename="action.all_circulation" reporter:core="true" reporter:label="Combined Aged and Active Circulations" oils_persist:readonly="true">
4120                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4121                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4122                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4123                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4124                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4125                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4126                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4127                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4128                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4129                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4130                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4131                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4132                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4133                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4134                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4135                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4136                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4137                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4138                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4139                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4140                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4141                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4142                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4143                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4144                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4145                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4146                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4147                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4148                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4149                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4150                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4151                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4152                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4153                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4154                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4155                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4156                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4157                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4158                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4159                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4160                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4161                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4162                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4163                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4164                 </fields>
4165                 <links>
4166                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4167                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4168                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4169                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4170                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4171                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4172                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4173                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4174                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4175                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4176                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4177                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4178                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4179                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4180                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4181                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4182                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4183                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4184                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4185                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4186                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4187                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4188                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
4189                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
4190                 </links>
4191         </class>
4192         <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">
4193                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4194                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4195                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4196                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4197                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4198                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4199                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4200                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4201                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4202                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4203                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4204                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4205                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4206                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4207                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4208                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4209                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4210                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4211                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4212                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4213                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4214                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4215                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4216                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4217                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4218                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4219                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4220                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4221                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4222                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4223                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4224                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4225                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4226                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4227                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4228                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4229                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4230                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4231                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4232                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4233                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4234                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4235                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4236                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4237                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4238                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4239                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4240                 </fields>
4241                 <links>
4242                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4243                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4244                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4245                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4246                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4247                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4248                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4249                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4250                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4251                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4252                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4253                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4254                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4255                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4256                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4257                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4258                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4259                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4260                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4261                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4262                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4263                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4264                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4265                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4266                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4267                 </links>
4268         </class>
4269         <class id="auch" 
4270                 controller="open-ils.cstore" 
4271                 oils_obj:fieldmapper="action::user_circ_history" 
4272                 oils_persist:tablename="action.usr_circ_history" 
4273                 reporter:label="User Checkout History">
4274                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4275                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4276                         <!-- prevent reporting on the user that owns the checkout history -->
4277                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4278                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4279                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4280                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4281                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4282                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4283                 </fields>
4284                 <links>
4285                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4286                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4287                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4288                 </links>
4289         </class>
4290         <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">
4291                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4292                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4293                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4294                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4295                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4296                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4297                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4298                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4299                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4300                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4301                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4302                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4303                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4304                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4305                 </fields>
4306                 <links>
4307                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4308                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4309                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4310                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4311                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4312                 </links>
4313                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4314                         <actions>
4315                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4316                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4317                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4318                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4319                         </actions>
4320                 </permacrud>
4321         </class>
4322
4323         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4324                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4325                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4326                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4327                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4328                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4329                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4330                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4331                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4332                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4333                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4334                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4335                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4336                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4337                 </fields>
4338                 <links>
4339                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4340                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4341                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4342                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4343                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4344                 </links>
4345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4346                         <actions>
4347                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4348                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4349                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4350                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4351                         </actions>
4352                 </permacrud>
4353         </class>
4354         
4355         <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">
4356                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4357                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4358                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4359                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4360                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4361                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4362                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4363                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4364                 </fields>
4365                 <links>
4366                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4367                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4368                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4369                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4370                 </links>
4371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4372                         <actions>
4373                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4374                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4375                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4376                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4377                         </actions>
4378                 </permacrud>
4379         </class>
4380         
4381         <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">
4382                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4383                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4384                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4385                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4386                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4387                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4388                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4389                 </fields>
4390                 <links>
4391                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4392                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4393                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4394                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4395                 </links>
4396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4397                         <actions>
4398                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4399                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4400                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4401                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4402                         </actions>
4403                 </permacrud>
4404         </class>
4405         
4406         <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">
4407                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4408                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4409                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4410                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4411                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4412                 </fields>
4413                 <links>
4414                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4415                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4416                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4417                 </links>
4418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4419                         <actions>
4420                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4421                     <context link="resource" field="owner" />
4422                 </create>
4423                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4424                     <context link="resource" field="owner" />
4425                 </retrieve>
4426                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4427                     <context link="resource" field="owner" />
4428                 </update>
4429                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4430                     <context link="resource" field="owner" />
4431                 </delete>
4432                         </actions>
4433                 </permacrud>
4434         </class>
4435         
4436         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4437                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4438                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4439                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4440                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4441                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4442                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4443                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4444                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4445                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4446                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4447                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4448                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4449                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4450                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4451                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4452                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4453                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4454                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4455                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4456                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4457                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4458                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4459                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4460                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4461                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4462                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4463                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4464                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4465                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4466                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4467                 </fields>
4468                 <links>
4469                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4470                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4471                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4472                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4473                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4474                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4475                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4476                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4477                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4478                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4479                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4480                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4481                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4482                 </links>
4483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4484                         <actions>
4485                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4486                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4487                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4488                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4489                         </actions>
4490                 </permacrud>
4491         </class>
4492         
4493         <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">
4494                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4495                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4496                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4497                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4498                 </fields>
4499                 <links>
4500                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4501                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4502                 </links>
4503                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4504                         <actions>
4505                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4506                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4507                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4508                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4509                         </actions>
4510                 </permacrud>
4511         </class>
4512
4513         <class id="ccnbi" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket_item" oils_persist:tablename="container.call_number_bucket_item" reporter:label="Call Number Bucket Item">
4514                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4515                         <field name="bucket" reporter:datatype="link"/>
4516                         <field name="id" reporter:datatype="id" />
4517                         <field name="target_call_number" reporter:datatype="link" />
4518                         <field name="create_time" reporter:datatype="timestamp" />
4519                         <field name="pos" reporter:datatype="int" />
4520                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4521                 </fields>
4522                 <links>
4523                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4524                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4525             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4526                 </links>
4527         </class>
4528         <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">
4529                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4530                         <field name="id" reporter:datatype="id" />
4531                         <field name="item" reporter:datatype="link"/>
4532                         <field name="note" reporter:datatype="text" />
4533                 </fields>
4534                 <links>
4535                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4536                 </links>
4537         </class>
4538         <class id="cbreb" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket" oils_persist:tablename="container.biblio_record_entry_bucket" reporter:label="Bibliographic Record Entry Bucket">
4539                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4540                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4541                         <field name="btype" reporter:datatype="text"/>
4542                         <field name="id" reporter:datatype="id" />
4543                         <field name="name" reporter:datatype="text"/>
4544                         <field name="description" reporter:datatype="text"/>
4545                         <field name="owner" reporter:datatype="link"/>
4546                         <field name="pub" reporter:datatype="bool"/>
4547                         <field name="create_time" reporter:datatype="timestamp" />
4548                 </fields>
4549                 <links>
4550                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4551                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4552                 </links>
4553         </class>
4554         <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">
4555                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4556                         <field name="id" reporter:datatype="id" />
4557                         <field name="bucket" reporter:datatype="link"/>
4558                         <field name="note" reporter:datatype="text" />
4559                 </fields>
4560                 <links>
4561                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4562                 </links>
4563         </class>
4564         <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">
4565                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4566                         <field name="hold" reporter:datatype="link"/>
4567                         <field name="id" reporter:datatype="id" />
4568                         <field name="target_copy" reporter:datatype="link"/>
4569                         <field name="proximity" reporter:datatype="number"/>
4570                 </fields>
4571                 <links>
4572                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4573                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4574                 </links>
4575         </class>
4576         <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">
4577                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4578                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4579                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4580                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4581                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4582                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4583                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4584                 </fields>
4585                 <links>
4586                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4587                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4588                 </links>
4589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4590             <actions>
4591                 <create permission="CREATE_HOLD_NOTIFICATION">
4592                                         <context link="hold" jump="usr" field="home_ou" />
4593                                 </create>
4594                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4595                                         <context link="hold" jump="usr" field="home_ou" />
4596                                 </retrieve>
4597                 <update permission="CREATE_HOLD_NOTIFICATION">
4598                                         <context link="hold" jump="usr" field="home_ou" />
4599                                 </update>
4600                 <delete permission="CREATE_HOLD_NOTIFICATION">
4601                                         <context link="hold" jump="usr" field="home_ou" />
4602                                 </delete>
4603             </actions>
4604         </permacrud>
4605         </class>
4606         <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">
4607                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4608                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4609                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4610                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4611                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4612                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4613                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4614                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4615                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4616                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4617                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4618                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4619                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4620                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4621                 </fields>
4622                 <links>
4623                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4624                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4625                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4626                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4627                 </links>
4628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4629             <actions>
4630                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4631                 <retrieve/>
4632                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4633                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4634             </actions>
4635         </permacrud>
4636         </class>
4637         <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">
4638                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4639                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4640                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4641                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4642                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4643             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4644             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4645             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4646                 </fields>
4647                 <links>
4648                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4649                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4650                 </links>
4651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4652             <actions>
4653                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4654                 <retrieve/>
4655                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4656                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4657             </actions>
4658         </permacrud>
4659         </class>
4660         <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">
4661                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4662                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4663             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4664             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4665                 </fields>
4666                 <links>
4667                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4668                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4669                 </links>
4670         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4671             <actions>
4672                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4673                                         <context link="lgroup" field="owner" />
4674                 </create>
4675                 <retrieve/>
4676                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4677                                         <context link="lgroup" field="owner" />
4678                 </update>
4679                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4680                                         <context link="lgroup" field="owner" />
4681                 </delete>
4682             </actions>
4683         </permacrud>
4684         </class>
4685
4686     <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">
4687         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4688             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4689             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4690             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4691             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4692         </fields>
4693         <links>
4694             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4695             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4696         </links>
4697         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4698             <actions>
4699                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4700                 <retrieve/>
4701                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4702                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4703             </actions>
4704         </permacrud>
4705     </class>
4706
4707         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4708                 <fields>
4709                         <field name="sre_id" oils_persist:virtual="true" />
4710                         <field name="location" oils_persist:virtual="true" />
4711                         <field name="owning_lib" oils_persist:virtual="true" />
4712                         <field name="basic_holdings" oils_persist:virtual="true" />
4713                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4714                         <field name="supplement_holdings" oils_persist:virtual="true" />
4715                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4716                         <field name="index_holdings" oils_persist:virtual="true" />
4717                         <field name="index_holdings_add" oils_persist:virtual="true" />
4718                         <field name="online" oils_persist:virtual="true" />
4719                         <field name="missing" oils_persist:virtual="true" />
4720                         <field name="incomplete" oils_persist:virtual="true" />
4721                 </fields>
4722         </class>
4723
4724         <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">
4725                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4726                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4727                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4728                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4729                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4730                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4731                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4732                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4733                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4734                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4735                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4736                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4737                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4738                 </fields>
4739                 <links>
4740                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4741                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4742                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4743                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4744                 </links>
4745                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4746                         <actions>
4747                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4748                                 <retrieve/>
4749                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4750                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4751                         </actions>
4752                 </permacrud>
4753         </class>
4754
4755         <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">
4756                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4757                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4758                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4759                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4760                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4761                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4762                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4763                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4764                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4765                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4766                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4767                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4768                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4769                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4770                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4771                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4772                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4773                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4774                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4775                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4776                 </fields>
4777                 <links>
4778                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4779                 </links>
4780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4781                         <actions>
4782                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4783                                         <context link="subscription" field="owning_lib" />
4784                                 </create>
4785                                 <retrieve />
4786                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4787                                         <context link="subscription" field="owning_lib" />
4788                                 </update>
4789                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4790                                         <context link="subscription" field="owning_lib" />
4791                                 </delete>
4792                         </actions>
4793                 </permacrud>
4794         </class>
4795
4796         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4797                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4798                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4799                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4800                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4801                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4802                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4803                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4804                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4805                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4806                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4807                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4808                 </fields>
4809                 <links>
4810                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4811                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4812                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4813                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4814                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4815                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4816                 </links>
4817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4818                         <actions>
4819                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4820                                 <retrieve />
4821                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4822                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4823                         </actions>
4824                 </permacrud>
4825         </class>
4826
4827         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4828                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4829                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4830                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4831                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4832                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4833                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4834                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4835                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4836                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4837                 </fields>
4838                 <links>
4839                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4840                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4841                 </links>
4842         </class>
4843
4844         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4845                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4846                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4847                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4848                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4849                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4850                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4851                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4852                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4853                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4854                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4855                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4856                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4857                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4858                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4859                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4860                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4861                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4862                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4863                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4864                 </fields>
4865                 <links>
4866                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4867                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4868                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4869                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4870                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4871                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4872                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4873                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4874                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4875                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4876                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4877                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4878                 </links>
4879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4880                         <actions>
4881                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4882                                 <retrieve />
4883                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4884                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4885                         </actions>
4886                 </permacrud>
4887         </class>
4888
4889         <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">
4890                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4891                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4892                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4893                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4894                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4895                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4896                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4897                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4898                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4899                 </fields>
4900                 <links>
4901                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4902                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4903                 </links>
4904                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4905                         <actions>
4906                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4907                                         <context link="distribution" field="holding_lib" />
4908                                 </create>
4909                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4910                                         <context link="distribution" field="holding_lib" />
4911                                 </retrieve>
4912                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4913                                         <context link="distribution" field="holding_lib" />
4914                                 </update>
4915                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4916                                         <context link="distribution" field="holding_lib" />
4917                                 </delete>
4918                         </actions>
4919                 </permacrud>
4920         </class>
4921
4922         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4923                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4924                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4925                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4926                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4927                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4928                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4929                 </fields>
4930                 <links>
4931                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4932                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4933                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4934                 </links>
4935                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4936                         <actions>
4937                                 <create permission="ADMIN_SERIAL_STREAM">
4938                                         <context link="distribution" field="holding_lib" />
4939                                 </create>
4940                                 <retrieve />
4941                                 <update permission="ADMIN_SERIAL_STREAM">
4942                                         <context link="distribution" field="holding_lib" />
4943                                 </update>
4944                                 <delete permission="ADMIN_SERIAL_STREAM">
4945                                         <context link="distribution" field="holding_lib" />
4946                                 </delete>
4947                         </actions>
4948                 </permacrud>
4949         </class>
4950
4951         <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">
4952                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4953                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4954                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4955                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4956                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4957                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4958                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4959                 </fields>
4960                 <links>
4961                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4962                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4963                 </links>
4964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4965                         <actions>
4966                                 <create permission="ADMIN_SERIAL_STREAM">
4967                                         <context link="stream" jump="distribution" field="holding_lib" />
4968                                 </create>
4969                                 <retrieve permission="RECEIVE_SERIAL">
4970                                         <context link="stream" jump="distribution" field="holding_lib" />
4971                                 </retrieve>
4972                                 <update permission="ADMIN_SERIAL_STREAM">
4973                                         <context link="stream" jump="distribution" field="holding_lib" />
4974                                 </update>
4975                                 <delete permission="ADMIN_SERIAL_STREAM">
4976                                         <context link="stream" jump="distribution" field="holding_lib" />
4977                                 </delete>
4978                         </actions>
4979                 </permacrud>
4980         </class>
4981
4982         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4983                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4984                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4985                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4986                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4987                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4988                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4989                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4990                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4991                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4992                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4993                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4994                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4995                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4996                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4997                 </fields>
4998                 <links>
4999                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5000                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5001                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
5002                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
5003                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5004                 </links>
5005                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5006                         <actions>
5007                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5008                                         <context link="subscription" field="owning_lib" />
5009                                 </create>
5010                                 <retrieve/>
5011                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5012                                         <context link="subscription" field="owning_lib" />
5013                                 </update>
5014                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5015                                         <context link="subscription" field="owning_lib" />
5016                                 </delete>
5017                         </actions>
5018                 </permacrud>
5019         </class>
5020
5021         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5022                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5023                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5024                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5025                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5026                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5027                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5028                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5029                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5030                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5031                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5032                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5033                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5034                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5035                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5036                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5037                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5038                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5039                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5040                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5041                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5042                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5043                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5044                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5045                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5046                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5047                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5048                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5049                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5050                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5051                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5052                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5053                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5054                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5055                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5056                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5057                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5058                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5059                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5060                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5061                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5062                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5063                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5064                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5065                 </fields>
5066                 <links>
5067                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5068                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5069                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5070                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5071                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5072                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5073                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5074                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5075                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5076                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5077                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5078                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5079                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5080                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5081                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5082                 </links>
5083                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5084                         <actions>
5085                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5086                                 <retrieve/>
5087                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5088                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5089                         </actions>
5090                 </permacrud>
5091         </class>
5092
5093         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5094                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5095                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5096                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5097                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5098                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5099                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5100                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5101                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5102                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5103                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5104                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5105                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5106                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5107                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5108                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5109                 </fields>
5110                 <links>
5111                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5112                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5113                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5114                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5115                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5116                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5117                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5118                 </links>
5119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5120                         <actions>
5121                                 <create permission="ADMIN_SERIAL_ITEM">
5122                                         <context link="stream" jump="distribution" field="holding_lib" />
5123                                 </create>
5124                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5125                                         <context link="stream" jump="distribution" field="holding_lib" />
5126                                 </retrieve>
5127                                 <update permission="ADMIN_SERIAL_ITEM">
5128                                         <context link="stream" jump="distribution" field="holding_lib" />
5129                                 </update>
5130                                 <delete permission="ADMIN_SERIAL_ITEM">
5131                                         <context link="stream" jump="distribution" field="holding_lib" />
5132                                 </delete>
5133                         </actions>
5134                 </permacrud>
5135         </class>
5136
5137         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5138                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5139                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5140                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5141                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5142                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5144                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5145                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5146                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5147                 </fields>
5148                 <links>
5149                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5150                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5151                 </links>
5152                 <!-- Not available via PCRUD at this time -->
5153         </class>
5154         <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">
5155                 <fields>
5156                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5157                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5158                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5159                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5160                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5161                 </fields>
5162                 <links>
5163                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5164                 </links>
5165         </class>
5166         <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">
5167                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5168                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5169                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5170                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5171                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5172                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5173                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5174                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5175                 </fields>
5176                 <links>
5177                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5178                 </links>
5179         </class>
5180         <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">
5181                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5182                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5183                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5184                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5185                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5186                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5187                 </fields>
5188                 <links>
5189                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5190                 </links>
5191                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5192                         <actions>
5193                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5194                                         <context link="distribution" field="holding_lib" />
5195                                 </create>
5196                                 <retrieve/>
5197                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5198                                         <context link="distribution" field="holding_lib" />
5199                                 </update>
5200                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5201                                         <context link="distribution" field="holding_lib" />
5202                                 </delete>
5203                         </actions>
5204                 </permacrud>
5205         </class>
5206
5207         <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">
5208                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5209                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5210                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5211                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5212                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5213                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5214                 </fields>
5215                 <links>
5216                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5217                 </links>
5218                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5219                         <actions>
5220                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5221                                         <context link="distribution" field="holding_lib" />
5222                                 </create>
5223                                 <retrieve/>
5224                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5225                                         <context link="distribution" field="holding_lib" />
5226                                 </update>
5227                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5228                                         <context link="distribution" field="holding_lib" />
5229                                 </delete>
5230                         </actions>
5231                 </permacrud>
5232         </class>
5233
5234         <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">
5235                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5236                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5237                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5238                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5239                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5240                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5241                 </fields>
5242                 <links>
5243                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5244                 </links>
5245                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5246                         <actions>
5247                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5248                                         <context link="distribution" field="holding_lib" />
5249                                 </create>
5250                                 <retrieve/>
5251                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5252                                         <context link="distribution" field="holding_lib" />
5253                                 </update>
5254                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5255                                         <context link="distribution" field="holding_lib" />
5256                                 </delete>
5257                         </actions>
5258                 </permacrud>
5259         </class>
5260
5261         <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">
5262                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5263                         <field name="id" reporter:datatype="id" />
5264                         <field name="owning_copy" reporter:datatype="link"/>
5265                         <field name="stat_cat" reporter:datatype="link"/>
5266                         <field name="stat_cat_entry" reporter:datatype="link"/>
5267                 </fields>
5268                 <links>
5269                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5270                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5271                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5272                 </links>
5273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5274                         <actions>
5275                                 <retrieve/>
5276                         </actions>
5277                 </permacrud>
5278         </class>
5279         <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">
5280                 <fields oils_persist:primary="code">
5281                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5282                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5283                 </fields>
5284                 <links/>
5285         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5286             <actions>
5287                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5288                 <retrieve/>
5289                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5290                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5291             </actions>
5292         </permacrud>
5293         </class>
5294         <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">
5295                 <fields oils_persist:primary="code">
5296                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5297                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5298                 </fields>
5299                 <links/>
5300         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5301             <actions>
5302                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5303                 <retrieve/>
5304                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5305                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5306             </actions>
5307         </permacrud>
5308         </class>
5309         <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">
5310                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5311                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5312                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5313                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5314                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5315                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5316                 </fields>
5317                 <links>
5318             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5319         </links>
5320         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5321             <actions>
5322                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5323                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5324                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5325                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5326             </actions>
5327         </permacrud>
5328         </class>
5329         <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">
5330                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5331                         <field name="id" reporter:datatype="id" />
5332                         <field name="name" reporter:datatype="text"/>
5333                 </fields>
5334                 <links/>
5335         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5336             <actions>
5337                 <create permission="CREATE_LASSO" global_required="true"/>
5338                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5339                 <update permission="UPDATE_LASSO" global_required="true"/>
5340                 <delete permission="DELETE_LASSO" global_required="true"/>
5341             </actions>
5342         </permacrud>
5343         </class>
5344         <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">
5345                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5346                         <field name="id" reporter:datatype="id" />
5347                         <field name="lasso" reporter:datatype="link"/>
5348                         <field name="org_unit" reporter:datatype="org_unit"/>
5349                 </fields>
5350                 <links>
5351                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5352                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5353                 </links>
5354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5355             <actions>
5356                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5357                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5358                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5359                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5360             </actions>
5361         </permacrud>
5362         </class>
5363         <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">
5364                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5365                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5366                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5367                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5368                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5369                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5370                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5371                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5372                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5373                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5374                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5375                 </fields>
5376                 <links>
5377                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5378                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5379                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5380                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5381                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5382                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5383                 </links>
5384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5385             <actions>
5386                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5387                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5388                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5389                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5390             </actions>
5391         </permacrud>
5392         </class>
5393         <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">
5394                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5395                         <field name="id" reporter:datatype="id" />
5396                         <field name="from_org" reporter:datatype="org_unit"/>
5397                         <field name="to_org" reporter:datatype="org_unit"/>
5398                         <field name="prox" reporter:datatype="int" />
5399                 </fields>
5400                 <links>
5401                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5402                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5403                 </links>
5404         </class>
5405         <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">
5406                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5407                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5408                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5409                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5410                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5411                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5412                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5413                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5414                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5415                 </fields>
5416                 <links/>
5417         </class>
5418         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5419                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5420                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5421                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5422                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5423                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5424                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5425                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5426                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5427                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5428                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5429                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5430                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5431                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5432                 </fields>
5433                 <links>
5434                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5435                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5436                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5437                 </links>
5438         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5439             <actions>
5440                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5441                 <retrieve/>
5442                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5443                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5444             </actions>
5445         </permacrud>
5446         </class>
5447         <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">
5448                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5449                         <field name="address_type"  reporter:datatype="text"/>
5450                         <field name="city"  reporter:datatype="text"/>
5451                         <field name="country"  reporter:datatype="text"/>
5452                         <field name="county"  reporter:datatype="text"/>
5453                         <field name="id" reporter:datatype="id" />
5454                         <field name="org_unit" reporter:datatype="org_unit"/>
5455                         <field name="post_code"  reporter:datatype="text"/>
5456                         <field name="state"  reporter:datatype="text"/>
5457                         <field name="street1"  reporter:datatype="text"/>
5458                         <field name="street2"  reporter:datatype="text"/>
5459                         <field name="valid" reporter:datatype="bool"/>
5460                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5461                 </fields>
5462                 <links>
5463                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5464                 </links>
5465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5466             <actions>
5467                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5468                 <retrieve/>
5469                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5470                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5471             </actions>
5472         </permacrud>
5473         </class>
5474         <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">
5475                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5476                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5477                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5478                         <field name="query_text" reporter:datatype="text"/>
5479                 </fields>
5480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5481             <actions>
5482                 <retrieve/>
5483             </actions>
5484         </permacrud>
5485         </class>
5486
5487         <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">
5488                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5489                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5490                         <field name="owner" reporter:datatype="org_unit"/>
5491                         <field name="code" reporter:datatype="text"/>
5492                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5493                         <field name="create_date" reporter:datatype="timestamp"/>
5494                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5495                 </fields>
5496                 <links>
5497                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5498                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5499                 </links>
5500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5501             <actions>
5502                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5503                 <retrieve/>
5504                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5505                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5506             </actions>
5507         </permacrud>
5508         </class>
5509         <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">
5510                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5511                         <field name="id" reporter:datatype="id"/>
5512                         <field name="grp" reporter:datatype="link"/>
5513                         <field name="pos" reporter:datatype="int"/>
5514                         <field name="query" reporter:datatype="link"/>
5515                 </fields>
5516                 <links>
5517                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5518                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5519                 </links>
5520         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5521             <actions>
5522                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5523                     <context link="grp" field="owner"/>
5524                 </create>
5525                 <retrieve/>
5526                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5527                     <context link="grp" field="owner"/>
5528                 </update>
5529                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5530                     <context link="grp" field="owner"/>
5531                 </delete>
5532             </actions>
5533         </permacrud>
5534         </class>
5535
5536         <!-- A note: Please update alhr and ahopl when updating ahr -->
5537         <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">
5538                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5539                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5540                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5541                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5542                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5543                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5544                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5545                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5546                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5547                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5548                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5549                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5550                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5551                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5552                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5553                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5554                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5555                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5556                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5557                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5558                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5559                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5560                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5561                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5562                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5563                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5564                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5565                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5566                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5567                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5568                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5569                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5570                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5571                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5572                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5573                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5574                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5575                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5576                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5577                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5578                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5579                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5580                 </fields>
5581                 <links>
5582                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5583                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5584                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5585                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5586                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5587                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5588                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5589                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5590                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5591                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5592                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5593                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5594                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5595                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5596                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5597                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5598                 </links>
5599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5600                         <actions>
5601                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5602                         </actions>
5603                 </permacrud>
5604         </class>
5605         <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">
5606                 <oils_persist:source_definition><![CDATA[
5607                 SELECT
5608                         ahr.*,
5609                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5610                                 copy_location_order_position,
5611                         CASE WHEN au.alias IS NOT NULL THEN
5612                                 au.alias
5613                         ELSE
5614                                 au.first_given_name
5615                         END AS usr_alias_or_first_given_name,
5616                         au.first_given_name AS usr_first_given_name,
5617                         au.second_given_name AS usr_second_given_name,
5618                         au.family_name AS usr_family_name,
5619                         au.prefix AS usr_prefix,
5620                         au.suffix AS usr_suffix,
5621                         au.alias AS usr_alias,
5622                         CASE WHEN au.alias IS NOT NULL THEN
5623                                 au.alias
5624                         ELSE
5625                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5626                                         COALESCE(au.family_name, ''),
5627                                         COALESCE(au.suffix, ''),
5628                                         ', ',
5629                                         COALESCE(au.prefix, ''),
5630                                         COALESCE(au.first_given_name, ''),
5631                                         COALESCE(au.second_given_name, '')
5632                                 ], ' '), E'\\s+,', ',')
5633                         END AS usr_alias_or_display_name,
5634                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5635                                 COALESCE(au.family_name, ''),
5636                                 COALESCE(au.suffix, ''),
5637                                 ', ',
5638                                 COALESCE(au.prefix, ''),
5639                                 COALESCE(au.first_given_name, ''),
5640                                 COALESCE(au.second_given_name, '')
5641                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5642                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5643                                 AS call_number_label,
5644                         siss.label AS issuance_label,
5645                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5646                         ahcm_1.copy_count AS potential_copies
5647                 FROM action.hold_request ahr
5648                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5649                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5650                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5651                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5652                 JOIN actor.usr au ON (au.id = ahr.usr)
5653                 JOIN (
5654                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5655                         FROM asset.copy_location
5656                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5657                 LEFT JOIN actor.usr_standing_penalty ausp 
5658                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5659                 LEFT JOIN config.standing_penalty csp
5660                         ON (
5661                                 csp.id = ausp.standing_penalty AND 
5662                                 csp.block_list LIKE '%CAPTURE%' AND (
5663                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5664                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5665                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5666                                         )
5667                                 )
5668                         )
5669                 JOIN (
5670                         SELECT COUNT(target_copy) AS copy_count, hold
5671                         FROM action.hold_copy_map
5672                         GROUP BY 2
5673                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5674                 LEFT JOIN serial.issuance siss
5675                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5676                 LEFT JOIN asset.copy_location_order acplo
5677                         ON (acp.location = acplo.location AND
5678                                 acp.circ_lib = acplo.org)
5679                 WHERE
5680                         ahr.capture_time IS NULL AND
5681                         ahr.cancel_time IS NULL AND
5682                         csp.id IS NULL AND
5683                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5684                         acp.status IN (0,7)
5685                 ]]></oils_persist:source_definition>
5686                 <fields oils_persist:primary="id">
5687                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5688                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5689                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5690                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5691                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5692                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5693                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5694                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5695                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5696                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5697                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5698                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5699                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5700                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5701                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5702                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5703                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5704                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5705                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5706                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5707                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5708                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5709                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5710                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5711                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5712                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5713                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5714                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5715                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5716                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5717                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5718                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5719                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5720                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5721                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5722                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5723                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5724                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5725                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5726                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5727                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5728                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5729                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5730                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5731                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5732                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5733                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5734                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5735                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5736                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5737                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5738                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5739                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5740                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5741                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5742                 </fields>
5743                 <links>
5744                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5745                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5746                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5747                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5748                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5749                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5750                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5751                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5752                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5753                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5754                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5755                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5756                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5757                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5758                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5759                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5760                 </links>
5761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5762                         <actions>
5763                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5764                         </actions>
5765                 </permacrud>
5766         </class>
5767         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5768                 <oils_persist:source_definition>
5769                         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 GROUP BY current_copy)x USING (current_copy, capture_time)
5770                 </oils_persist:source_definition>
5771                 <fields oils_persist:primary="id">
5772                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5773                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5774                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5775                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5776                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5777                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5778                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5779                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5780                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5781                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5782                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5783                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5784                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5785                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5786                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5787                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5788                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5789                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5790                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5791                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5792                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5793                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5794                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5795                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5796                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5797                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5798                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5799                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5800                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5801                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5802                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5803                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5804                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5805                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5806                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5807                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5808                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5809                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5810                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5811                 </fields>
5812                 <links>
5813                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5814                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5815                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5816                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5817                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5818                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5819                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5820                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5821                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5822                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5823                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5824                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5825                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5826                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5827                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5828                 </links>
5829         </class>
5830
5831         <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">
5832                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5833                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5834                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5835                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5836                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5837                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5838                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5839                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5840                 </fields>
5841                 <links>
5842                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5843                 </links>
5844                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5845                         <actions>
5846                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5847                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5848                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5849                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5850                         </actions>
5851                 </permacrud>
5852         </class>
5853         <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">
5854                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5855                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5856                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5857                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5858                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5859                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5860                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5861                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5862                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5863                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5864                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5865                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5866                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5867                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5868                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5869                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5870                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5871                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5872                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5873                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5874                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5875                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5876                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5877                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5878                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5879                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5880                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5881                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5882                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5883                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5884                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5885                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5886                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5887                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5888                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5889                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5890                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5891                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5892                 </fields>
5893                 <links>
5894                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5895                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5896                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5897                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5898                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5899                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5900                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5901                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5902                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5903                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5904                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5905                 </links>
5906                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5907                         <actions>
5908                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5909                         </actions>
5910                 </permacrud>
5911         </class>
5912         <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">
5913                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5914                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5915                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5916                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5917                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5918                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5919                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5920                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5921                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5922                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5923                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5924                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5925                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5926                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5927                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5928                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5929                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5930                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5931                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5932                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5933                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5934                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5935                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5936                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5937                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5938                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5939                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5940                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5941                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5942                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5943                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5944                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5945                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5946                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5947                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5948                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5949                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5950                 </fields>
5951                 <links>
5952                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5953                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5954                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5955                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5956                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5957                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5958                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5959                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5960                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5961                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5962                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5963                 </links>
5964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5965                         <actions>
5966                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5967                         </actions>
5968                 </permacrud>
5969         </class>
5970
5971         <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">
5972                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5973                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5974                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5975                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5976                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5977                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5978                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5979                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5980                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5981                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5982                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5983                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5984                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5985                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5986                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5987                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5988                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5989                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5990                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5991                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5992                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5993                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5994                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5995                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5996                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5997                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5998                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5999                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
6000                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
6001                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
6002                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
6003                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6004                 </fields>
6005                 <links>
6006                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6007                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6008                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6009                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6010                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6011                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6012                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6013                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6014                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6015                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6016                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6017                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6018                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6019                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6020                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6021                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6022                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6023                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6024                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6025                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6026                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6027                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6028                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6029                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6030                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6031                 </links>
6032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6033             <actions>
6034                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6035                 <retrieve />
6036                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6037                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6038             </actions>
6039         </permacrud>
6040         </class>
6041         <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">
6042                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6043                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6044                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6045                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6046                 </fields>
6047                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6048                         <actions>
6049                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6050                                 <retrieve/>
6051                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6052                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6053                         </actions>
6054                 </permacrud>
6055         </class>
6056         <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">
6057                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6058                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6059                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6060                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6061                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6062                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6063                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6064                 </fields>
6065                 <links>
6066                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6067                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6068                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6069                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6070                 </links>
6071                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6072                         <actions>
6073                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6074                                 <retrieve/>
6075                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6076                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6077                         </actions>
6078                 </permacrud>
6079         </class>
6080         <class id="ccnb" controller="open-ils.cstore" oils_obj:fieldmapper="container::call_number_bucket" oils_persist:tablename="container.call_number_bucket" reporter:label="Call Number Bucket">
6081                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6082                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6083                         <field name="btype" reporter:datatype="text"/>
6084                         <field name="id" reporter:datatype="id" />
6085                         <field name="name"  reporter:datatype="text"/>
6086                         <field name="description" reporter:datatype="text"/>
6087                         <field name="owner" reporter:datatype="link"/>
6088                         <field name="pub" reporter:datatype="bool"/>
6089                         <field name="create_time" reporter:datatype="timestamp" />
6090                 </fields>
6091                 <links>
6092                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6093                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6094                 </links>
6095         </class>
6096         <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">
6097                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6098                         <field name="id" reporter:datatype="id" />
6099                         <field name="bucket" reporter:datatype="link"/>
6100                         <field name="note" reporter:datatype="text" />
6101                 </fields>
6102                 <links>
6103                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6104                 </links>
6105         </class>
6106         <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">
6107                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6108                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6109                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6110                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6111                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6112                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6113                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6114                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6115                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6116                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6117                 </fields>
6118                 <links>
6119                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6120                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6121                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6122                 </links>
6123                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6124                         <actions>
6125                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6126                         </actions>
6127                 </permacrud>
6128         </class>
6129         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6130                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6131                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6132                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6133                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6134                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6135                 </fields>
6136                 <links>
6137                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6138                 </links>
6139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6140                         <actions>
6141                                 <retrieve permission="VIEW_USER">
6142                                         <context link="usr" field="home_ou" />
6143                                 </retrieve>
6144                         </actions>
6145                 </permacrud>
6146         </class>
6147     <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">
6148         <fields oils_persist:primary="field">
6149             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6150             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6151             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6152         </fields>
6153         <links/>
6154         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6155             <actions>
6156                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6157                 <retrieve />
6158                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6159                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6160             </actions>
6161         </permacrud>
6162     </class>
6163         <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">
6164                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6165                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6166                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6167                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6168                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6169                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6170                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6171                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6172                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6173                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6174                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6175                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6176                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6177                 </fields>
6178                 <links>
6179                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6180                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6181                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6182                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6183                 </links>
6184         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6185             <actions>
6186                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6187                 <retrieve />
6188                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6189                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6190             </actions>
6191         </permacrud>
6192         </class>
6193         <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">
6194                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6195                         <field name="field" reporter:datatype="link"/>
6196                         <field name="id" reporter:datatype="id" />
6197                         <field name="source" reporter:datatype="link"/>
6198                         <field name="value"  reporter:datatype="text"/>
6199                 </fields>
6200                 <links>
6201                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6202                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6203                 </links>
6204         </class>
6205         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6206                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6207                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6208                         <field name="btype" reporter:datatype="text"/>
6209                         <field name="id" reporter:datatype="id" />
6210                         <field name="name"  reporter:datatype="text"/>
6211                         <field name="description" reporter:datatype="text"/>
6212                         <field name="owner" reporter:datatype="link"/>
6213                         <field name="pub" reporter:datatype="bool"/>
6214                         <field name="create_time" reporter:datatype="timestamp" />
6215                 </fields>
6216                 <links>
6217                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6218                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6219                 </links>
6220         </class>
6221         <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">
6222                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6223                         <field name="id" reporter:datatype="id" />
6224                         <field name="bucket" reporter:datatype="link"/>
6225                         <field name="note" reporter:datatype="text" />
6226                 </fields>
6227                 <links>
6228                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6229                 </links>
6230         </class>
6231         <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">
6232                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6233                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6234                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6235                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6236                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6237                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6238                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6239                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6240                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6241                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6242                 </fields>
6243                 <links>
6244                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6245                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6246                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6247                 </links>
6248         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6249             <actions>
6250                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6251                     <context link="xact" jump="usr" field="home_ou"/>
6252                 </retrieve>
6253                         </actions>
6254                 </permacrud>
6255         </class>
6256         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6257                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6258                         <field name="id" reporter:datatype="id" />
6259                         <field name="ind1" />
6260                         <field name="ind2" />
6261                         <field name="record" />
6262                         <field name="subfield" />
6263                         <field name="tag" />
6264                         <field name="value" />
6265                 </fields>
6266                 <links>
6267                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6268                 </links>
6269         </class>
6270         <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">
6271                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6272                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6273                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6274                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6275                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6276                 </fields>
6277                 <links>
6278                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6279                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6280                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6281                 </links>
6282         </class>
6283         <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">
6284                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6285                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6286                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6287                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6288                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6289                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6290                 </fields>
6291                 <links>
6292                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6293                 </links>
6294         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6295             <actions>
6296                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6297                 <retrieve/>
6298                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6299                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6300             </actions>
6301         </permacrud>
6302
6303         </class>
6304         <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">
6305                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6306                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6307                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6308                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6309                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6310                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6311                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6312                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6313                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6314                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6315                 </fields>
6316                 <links>
6317                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6318                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6319                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6320                 </links>
6321         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6322             <actions>
6323                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6324                 <retrieve/>
6325                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6326                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6327             </actions>
6328         </permacrud>
6329         </class>
6330         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6331                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6332                         <field name="create_date" reporter:datatype="timestamp"/>
6333                         <field name="creator" reporter:datatype="link"/>
6334                         <field name="edit_date" reporter:datatype="timestamp"/>
6335                         <field name="editor" reporter:datatype="link"/>
6336                         <field name="id" reporter:datatype="id" />
6337                         <field name="pub" reporter:datatype="bool"/>
6338                         <field name="record" reporter:datatype="link"/>
6339                         <field name="value"  reporter:datatype="text"/>
6340                 </fields>
6341                 <links>
6342                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6343                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6344                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6345                 </links>
6346         </class>
6347         <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">
6348                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6349                         <field name="balance_owed" reporter:datatype="money" />
6350                         <field name="total_owed" reporter:datatype="money" />
6351                         <field name="total_paid" reporter:datatype="money" />
6352                         <field name="usr" reporter:datatype="link"/>
6353                 </fields>
6354                 <links>
6355                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6356                 </links>
6357         </class>
6358         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6359                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6360                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6361                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6362                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6363                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6364                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6365                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6366                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6367                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6368                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6369                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6370                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6371                 </fields>
6372                 <links>
6373                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6374                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6375                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6376                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6377                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6378                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6379                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6380                 </links>
6381         </class>
6382         <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">
6383                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6384                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6385                         <field name="quality" reporter:datatype="int" />
6386                         <field name="source" reporter:datatype="text"/>
6387                         <field name="transcendant" reporter:datatype="bool"/>
6388                         <field name="can_have_copies" reporter:datatype="bool"/>
6389                 </fields>
6390                 <links/>
6391         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6392             <actions>
6393                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6394                 <retrieve/>
6395                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6396                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6397             </actions>
6398         </permacrud>
6399         </class>
6400         <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">
6401                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6402                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6403                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6404                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6405                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6406                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6407                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6408                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6409                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6410                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6411                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6412                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6413                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6414                 </fields>
6415                 <links>
6416                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6417                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6418                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6419                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6420                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6421                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6422                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6423                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6424                 </links>
6425                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6426                         <actions>
6427                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6428                                         <context link="usr" field="home_ou" />
6429                                 </retrieve>
6430                         </actions>
6431                 </permacrud>
6432         </class>
6433         <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">
6434                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6435                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6436                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6437                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6438                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6439                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6440                 </fields>
6441                 <links>
6442                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6443                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6444                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6445                 </links>
6446         </class>
6447         <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">
6448                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6449                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6450                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6451                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6452                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6453                 </fields>
6454                 <links>
6455                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6456                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6457                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6458                 </links>
6459         </class>
6460         <class id="cubi" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket_item" oils_persist:tablename="container.user_bucket_item" reporter:label="User Bucket Item">
6461                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6462                         <field name="bucket" reporter:datatype="link"/>
6463                         <field name="id" reporter:datatype="id" />
6464                         <field name="target_user" reporter:datatype="link"/>
6465                         <field name="create_time" reporter:datatype="timestamp" />
6466                         <field name="pos" reporter:datatype="int" />
6467                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6468                 </fields>
6469                 <links>
6470                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6471                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6472             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6473                 </links>
6474         </class>
6475         <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">
6476                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6477                         <field name="id" reporter:datatype="id" />
6478                         <field name="item" reporter:datatype="link"/>
6479                         <field name="note" reporter:datatype="text" />
6480                 </fields>
6481                 <links>
6482                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6483                 </links>
6484         </class>
6485         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6486                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6487                         <field name="balance_owed" reporter:datatype="money" />
6488                         <field name="total_owed" reporter:datatype="money" />
6489                         <field name="total_paid" reporter:datatype="money" />
6490                         <field name="usr" reporter:datatype="link"/>
6491                 </fields>
6492                 <links>
6493                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6494                 </links>
6495         </class>
6496         <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">
6497                 <fields oils_persist:primary="code" oils_persist:sequence="">
6498                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6499                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6500                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6501                 </fields>
6502                 <links/>
6503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6504             <actions>
6505                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6506                 <retrieve/>
6507                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6508                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6509             </actions>
6510         </permacrud>
6511         </class>
6512         <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">
6513                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6514                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6515                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6516                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6517                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6518                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6519                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6520                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6521                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6522                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6523                 </fields>
6524                 <links>
6525                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6526                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6527                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6528                 </links>
6529         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6530             <actions>
6531                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6532                     <context link="xact" jump="usr" field="home_ou"/>
6533                 </retrieve>
6534                         </actions>
6535                 </permacrud>
6536         </class>
6537         <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">
6538                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6539                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6540                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6541                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6542                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6543                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6544                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6545                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6546                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6547                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6548                 </fields>
6549                 <links>
6550                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6551                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6552                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6553                 </links>
6554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6555             <actions>
6556                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6557                     <context link="xact" jump="usr" field="home_ou"/>
6558                 </retrieve>
6559                         </actions>
6560                 </permacrud>
6561         </class>
6562         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6563                 <fields oils_persist:primary="id" oils_persist:sequence="">
6564                         <field name="checkin_lib" reporter:datatype="link"/>
6565                         <field name="checkin_staff" reporter:datatype="link"/>
6566                         <field name="checkin_time" reporter:datatype="timestamp"/>
6567                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6568                         <field name="circ_staff" reporter:datatype="link"/>
6569                         <field name="desk_renewal" reporter:datatype="bool"/>
6570                         <field name="due_date" reporter:datatype="timestamp"/>
6571                         <field name="duration" reporter:datatype="interval"/>
6572                         <field name="duration_rule" reporter:datatype="link"/>
6573                         <field name="fine_interval" reporter:datatype="interval"/>
6574                         <field name="id" reporter:datatype="id" />
6575                         <field name="max_fine" reporter:datatype="money" />
6576                         <field name="max_fine_rule" reporter:datatype="link"/>
6577                         <field name="opac_renewal" reporter:datatype="bool"/>
6578                         <field name="phone_renewal" reporter:datatype="bool"/>
6579                         <field name="recurring_fine" reporter:datatype="money" />
6580                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6581                         <field name="renewal_remaining" reporter:datatype="int" />
6582             <field name="grace_period" reporter:datatype="interval" />
6583                         <field name="stop_fines" reporter:datatype="text"/>
6584                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6585                         <field name="target_copy" reporter:datatype="link"/>
6586                         <field name="usr" reporter:datatype="link"/>
6587                         <field name="xact_finish" reporter:datatype="timestamp" />
6588                         <field name="xact_start" reporter:datatype="timestamp" />
6589                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6590                 </fields>
6591                 <links>
6592                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6593                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6594                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6595                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6596                 </links>
6597         </class>
6598         <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">
6599                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6600                         <field name="field" reporter:datatype="link"/>
6601                         <field name="id" reporter:datatype="id" />
6602                         <field name="source" reporter:datatype="link"/>
6603                         <field name="value" reporter:datatype="text"/>
6604                 </fields>
6605                 <links>
6606                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6607                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6608                 </links>
6609         </class>
6610         <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">
6611                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6612                         <field name="high" reporter:datatype="money" />
6613                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6614                         <field name="low" reporter:datatype="money" />
6615                         <field name="name" reporter:datatype="text"/>
6616                         <field name="normal" reporter:datatype="money" />
6617                         <field name="recurrence_interval" reporter:datatype="interval"/>
6618             <field name="grace_period" reporter:datatype="interval" />
6619                 </fields>
6620                 <links/>
6621         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6622             <actions>
6623                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6624                 <retrieve/>
6625                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6626                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6627             </actions>
6628         </permacrud>
6629         </class>
6630         <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">
6631                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6632                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6633                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6634                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6635                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6636                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6637                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6638                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6639                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6640                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6641                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6642                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6643                 </fields>
6644                 <links>
6645                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6646                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6647                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6648                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6649                 </links>
6650         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6651             <actions>
6652                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6653                     <context link="xact" jump="usr" field="home_ou"/>
6654                 </retrieve>
6655                         </actions>
6656                 </permacrud>
6657         </class>
6658         <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">
6659                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6660                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6661                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6662                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6663                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6664                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6665                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6666                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6667                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6668                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6669                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6670                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6671                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6672                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6673                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6674                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6675                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6676                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6677                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6678                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6679                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6680                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6681                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6682                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6683                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6684                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6685                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6686                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6687                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6688                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6689                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6690                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6691                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6692                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6693                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6694                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6695                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6696                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6697                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6698                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6699                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6700                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6701                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6702                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6703                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6704                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6705                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6706                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6707                 </fields>
6708                 <links>
6709                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6710                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6711                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6712                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6713                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6714                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6715                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6716                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6717                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6718                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6719                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6720                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6721                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6722                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6723                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6724                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6725                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6726                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6727                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6728                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6729                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6730                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6731                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6732                 </links>
6733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6734             <actions>
6735                 <create permission="CREATE_COPY">
6736                     <context link="call_number" field="owning_lib"/>
6737                 </create>
6738                 <retrieve/>
6739                 <update permission="UPDATE_COPY">
6740                     <context link="call_number" field="owning_lib"/>
6741                 </update>
6742                 <delete permission="DELETE_COPY">
6743                     <context link="call_number" field="owning_lib"/>
6744                 </delete>
6745             </actions>
6746         </permacrud>
6747         </class>
6748
6749         <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">
6750                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6751                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6752                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6753                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6754                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6755                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6756                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6757                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6758                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6759                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6760                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6761                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6762                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6763                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6764                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6765                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6766                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6767                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6768                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6769                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6770                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6771                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6772                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6773                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6774                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6775                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6776                 </fields>
6777                 <links>
6778                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6779                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6780                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6781                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6782                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6783                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6784                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6785                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6786                 </links>
6787                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6788                         <actions>
6789                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6790                                 <retrieve />
6791                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6792                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6793                         </actions>
6794                 </permacrud>
6795         </class>
6796
6797         <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">
6798                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6799                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6800                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6801                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6802                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6803                 </fields>
6804                 <links/>
6805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6806             <actions>
6807                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6808                 <retrieve/>
6809                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6810                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6811             </actions>
6812         </permacrud>
6813         </class>
6814         <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">
6815                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6816                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6817                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6818                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6819                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6820                 </fields>
6821                 <links/>
6822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6823             <actions>
6824                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6825                 <retrieve/>
6826                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6827                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6828             </actions>
6829         </permacrud>
6830         </class>
6831         <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">
6832                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6833                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6834                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6835                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6836                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6837                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6838                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6839                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6840                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6841                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6842                 </fields>
6843                 <links>
6844                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6845                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6846                 </links>
6847         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6848             <actions>
6849                 <create permission="CREATE_PERM" global_required="true"/>
6850                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6851                 <update permission="UPDATE_PERM" global_required="true"/>
6852                 <delete permission="DELETE_PERM" global_required="true"/>
6853             </actions>
6854         </permacrud>
6855         </class>
6856         <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">
6857                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6858                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6859                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6860                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6861                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6862                 </fields>
6863                 <links>
6864                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6865                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6866                 </links>
6867         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6868             <actions>
6869                 <create permission="ADMIN_SURVEY">
6870                     <context link="question" jump="survey" field="owner"/>
6871                 </create>
6872                 <retrieve/>
6873                 <update permission="ADMIN_SURVEY">
6874                     <context link="question" jump="survey" field="owner"/>
6875                 </update>
6876                 <delete permission="ADMIN_SURVEY">
6877                     <context link="question" jump="survey" field="owner"/>
6878                 </delete>
6879             </actions>
6880         </permacrud>
6881         </class>
6882         <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">
6883                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6884                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6885                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6886                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6887                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6888                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6889                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6890                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6891                 </fields>
6892                 <links>
6893                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6894                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6895                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6896                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6897                 </links>
6898                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6899                         <actions>
6900                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6901                         </actions>
6902                 </permacrud>
6903         </class>
6904         <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">
6905                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6906                         <field name="balance_owed" reporter:datatype="money" />
6907                         <field name="total_owed" reporter:datatype="money" />
6908                         <field name="total_paid" reporter:datatype="money" />
6909                         <field name="usr" reporter:datatype="link"/>
6910                 </fields>
6911                 <links>
6912                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6913                 </links>
6914         </class>
6915         <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">
6916                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6917                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6918                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6919                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6920                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6921                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6922                 </fields>
6923                 <links>
6924                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6925                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6926                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6927                 </links>
6928         </class>
6929         <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">
6930                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6931                         <field name="field" reporter:datatype="link"/>
6932                         <field name="id" reporter:datatype="id" />
6933                         <field name="source" reporter:datatype="link"/>
6934                         <field name="value" reporter:datatype="text"/>
6935                 </fields>
6936                 <links>
6937                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6938                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6939                 </links>
6940         </class>
6941         <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">
6942                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6943                         <field name="field" reporter:datatype="link"/>
6944                         <field name="id" reporter:datatype="id" />
6945                         <field name="source" reporter:datatype="link"/>
6946                         <field name="value" reporter:datatype="text"/>
6947                 </fields>
6948                 <links>
6949                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6950                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6951                 </links>
6952         </class>
6953         <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">
6954                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6955                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6956                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6957                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6958                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6959                 </fields>
6960                 <links>
6961                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6962                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6963                 </links>
6964         </class>
6965         <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">
6966                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6967                         <field name="depth" reporter:datatype="int" />
6968                         <field name="grantable" reporter:datatype="bool"/>
6969                         <field name="grp" reporter:datatype="link"/>
6970                         <field name="id" reporter:datatype="id" />
6971                         <field name="perm" reporter:datatype="link"/>
6972                 </fields>
6973                 <links>
6974                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6975                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6976                 </links>
6977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6978             <actions>
6979                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6980                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6981                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6982                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6983             </actions>
6984         </permacrud>
6985         </class>
6986         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6987                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6988                         <field name="items" oils_persist:virtual="true" />
6989                         <field name="btype" reporter:datatype="text"/>
6990                         <field name="id" reporter:datatype="id" />
6991                         <field name="name" reporter:datatype="text"/>
6992                         <field name="description" reporter:datatype="text"/>
6993                         <field name="owner" reporter:datatype="link"/>
6994                         <field name="pub" reporter:datatype="bool"/>
6995                         <field name="create_time" reporter:datatype="timestamp" />
6996                 </fields>
6997                 <links>
6998                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6999                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
7000                 </links>
7001         </class>
7002         <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">
7003                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7004                         <field name="id" reporter:datatype="id" />
7005                         <field name="bucket" reporter:datatype="link"/>
7006                         <field name="note" reporter:datatype="text" />
7007                 </fields>
7008                 <links>
7009                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7010                 </links>
7011         </class>
7012         <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">
7013                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7014                         <field name="id" reporter:datatype="int" />
7015                         <field name="usr" reporter:datatype="link"/>
7016                         <field name="work_ou" reporter:datatype="link"/>
7017                 </fields>
7018                 <links>
7019                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7020                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7021                 </links>
7022         </class>
7023         <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">
7024                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7025                         <field name="depth" reporter:datatype="int"/>
7026                         <field name="grantable" reporter:datatype="bool"/>
7027                         <field name="id" reporter:datatype="id" />
7028                         <field name="perm" reporter:datatype="link"/>
7029                         <field name="usr" reporter:datatype="link"/>
7030                 </fields>
7031                 <links>
7032                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7033                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7034                 </links>
7035         </class>
7036         <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">
7037                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7038                         <field name="object_id" reporter:datatype="text"/>
7039                         <field name="grantable" reporter:datatype="bool"/>
7040                         <field name="id" reporter:datatype="id" />
7041                         <field name="perm" reporter:datatype="link"/>
7042                         <field name="usr" reporter:datatype="link"/>
7043                         <field name="object_type" reporter:datatype="text"/>
7044                 </fields>
7045                 <links>
7046                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7047                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7048                 </links>
7049         </class>
7050         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
7051                 <fields oils_persist:primary="id" oils_persist:sequence="">
7052                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7053                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7054                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7055                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7056                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7057                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7058                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7059                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7061                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7063                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7064                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7065                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7066                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7067                 </fields>
7068                 <links>
7069                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7070                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7071                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7072                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7073                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7074                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7075                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7076                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7077                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7078                 </links>
7079         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7080             <actions>
7081                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7082                     <context link="xact" jump="usr" field="home_ou"/>
7083                 </retrieve>
7084                         </actions>
7085                 </permacrud>
7086         </class>
7087         <class id="mbp" controller="open-ils.cstore" oils_obj:fieldmapper="money::bnm_payment" oils_persist:tablename="money.bnm_payment_view" reporter:core="true" reporter:label="Payments: Brick-and-mortar">
7088                 <fields oils_persist:primary="id" oils_persist:sequence="">
7089                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7090                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7091                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7092                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7093                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7094                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7095                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7096                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7097                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7098                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7099                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7100                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7101                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7102                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7103                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7104                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7105                 </fields>
7106                 <links>
7107                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7108                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7109                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7110                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7111                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7112                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7113                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7114                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7115                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7116                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7117                 </links>
7118         </class>
7119         <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">
7120                 <fields oils_persist:primary="id" oils_persist:sequence="">
7121                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7122                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7123                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7124                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7125                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7126                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7127                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7128                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7129                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7130                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7131                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7132                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7133                 </fields>
7134                 <links>
7135                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7136                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7137                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7138                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7139                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7140                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7141                 </links>
7142         </class>
7143         <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">
7144                 <fields oils_persist:primary="id" oils_persist:sequence="">
7145                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7146                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7147                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7148                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7149                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7150                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7151                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7152                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7153                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7154                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7155                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7156                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7157                 </fields>
7158                 <links>
7159                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7160                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7161                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7162                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7163                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7164                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7165                 </links>
7166         </class>
7167         <class id="cbrebi" controller="open-ils.cstore" oils_obj:fieldmapper="container::biblio_record_entry_bucket_item" oils_persist:tablename="container.biblio_record_entry_bucket_item" reporter:label="Biblio Record Entry Bucket Item">
7168                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7169                         <field name="bucket" reporter:datatype="link"/>
7170                         <field name="id" reporter:datatype="id" />
7171                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7172                         <field name="create_time" reporter:datatype="timestamp" />
7173                         <field name="pos" reporter:datatype="int" />
7174                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7175                 </fields>
7176                 <links>
7177                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7178                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7179             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7180                 </links>
7181         </class>
7182         <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">
7183                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7184                         <field name="id" reporter:datatype="id" />
7185                         <field name="item" reporter:datatype="link"/>
7186                         <field name="note" reporter:datatype="text" />
7187                 </fields>
7188                 <links>
7189                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7190                 </links>
7191         </class>
7192         <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">
7193                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7194                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7195                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7196                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7197                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7198                 </fields>
7199                 <links>
7200                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7201                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7202                 </links>
7203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7204                         <actions>
7205                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7206                         </actions>
7207                 </permacrud>
7208         </class>
7209     <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">
7210         <fields oils_persist:primary="field">
7211             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7212             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7213             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7214         </fields>
7215         <links/>
7216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7217             <actions>
7218                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7219                 <retrieve />
7220                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7221                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7222             </actions>
7223         </permacrud>
7224     </class>
7225         <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">
7226                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7227                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7228                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7229                 </fields>
7230                 <links/>
7231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7232             <actions>
7233                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7234                 <retrieve/>
7235                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7236                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7237             </actions>
7238         </permacrud>
7239         </class>
7240
7241
7242         <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">
7243                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7244                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7245                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7246                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7247                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7248                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7249                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7250                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7251                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7252                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7253                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7254                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7255                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7256                 </fields>
7257                 <links>
7258                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7259                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7260                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7261                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7262                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7263                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7264                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7265                 </links>
7266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7267             <actions>
7268                 <create permission="TRANSIT_COPY">
7269                     <context link="target_copy" field="owner"/>
7270                 </create>
7271                 <retrieve/>
7272                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7273                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7274             </actions>
7275         </permacrud>
7276         </class>
7277         <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">
7278                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7279                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7280                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7281                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7282                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7283                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7284                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7285                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7286                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7287                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7288                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7289                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7290                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7291                 </fields>
7292                 <links>
7293                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7294                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7295                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7296                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7297                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7298                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7299                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7300                 </links>
7301         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7302             <actions>
7303                 <create permission="TRANSIT_COPY" context_field="owner">
7304                     <context link="target_copy" field="circ_lib"/>
7305                 </create>
7306                 <retrieve/>
7307                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7308                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7309             </actions>
7310         </permacrud>
7311         </class>
7312         <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">
7313                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7314                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7315                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7316                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7317                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7318                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7319                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7320                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7321                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7322                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7323                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7324                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7325                 </fields>
7326                 <links>
7327                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7328                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7329                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7330                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7331                 </links>
7332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7333             <actions>
7334                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7335                     <context link="xact" jump="usr" field="home_ou"/>
7336                 </retrieve>
7337                         </actions>
7338                 </permacrud>
7339         </class>
7340         <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">
7341                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7342                         <field name="grp" />
7343                         <field name="id" reporter:datatype="id" />
7344                         <field name="usr" />
7345                 </fields>
7346                 <links>
7347                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7348                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7349                 </links>
7350         </class>
7351         <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">
7352                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7353                         <field name="id" reporter:datatype="id" />
7354                         <field name="fq_field" reporter:datatype="text"/>
7355                         <field name="identity_value" reporter:datatype="text"/>
7356                         <field name="translation" reporter:datatype="text"/>
7357                         <field name="string" reporter:datatype="text"/>
7358                 </fields>
7359                 <links>
7360                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7361                 </links>
7362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7363             <actions>
7364                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7365                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7366                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7367                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7368             </actions>
7369         </permacrud>
7370         </class>
7371         <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">
7372                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7373                         <field name="id" reporter:datatype="id" />
7374                         <field name="fm_class" reporter:datatype="text"/>
7375                         <field name="field" reporter:datatype="text"/>
7376                         <field name="owner" reporter:datatype="org_unit"/>
7377                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7378                 </fields>
7379                 <links>
7380                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7381                 </links>
7382         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7383             <actions>
7384                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7385                 <retrieve/>
7386                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7387                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7388             </actions>
7389         </permacrud>
7390         </class>
7391         <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">
7392                 <fields oils_persist:primary="code">
7393                         <field name="code" reporter:datatype="id" />
7394                         <field name="marc_code" reporter:datatype="text"/>
7395                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7396                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7397                 </fields>
7398                 <links/>
7399         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7400             <actions>
7401                 <create permission="CREATE_LOCALE" global_required="true"/>
7402                 <retrieve/>
7403                 <update permission="UPDATE_LOCALE" global_required="true"/>
7404                 <delete permission="DELETE_LOCALE" global_required="true"/>
7405             </actions>
7406         </permacrud>
7407         </class>
7408         <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">
7409                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7410                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7411                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7412                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7413             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7414                 </fields>
7415                 <links>
7416                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7417                 </links>
7418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7419             <actions>
7420                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7421                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7422                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7423                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7424             </actions>
7425         </permacrud>
7426         </class>
7427
7428         <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">
7429                 <fields oils_persist:primary="id">
7430                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7431                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7432                 </fields>
7433                 <links/>
7434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7435             <actions>
7436                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7437                 <retrieve/>
7438                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7439                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7440             </actions>
7441         </permacrud>
7442         </class>
7443
7444         <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">
7445                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7446                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7447                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7448                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7449                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7450                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7451                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7452                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7453                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7454                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7455                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7456                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7457                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7458                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7459                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7460                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7461                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7462                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7463                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7464                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7465                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7466                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7467                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7468                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7469                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7470                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7471                 </fields>
7472                 <links>
7473                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7474                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7475                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7476                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7477                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7478                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7479                 </links>
7480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7481             <actions>
7482                 <create permission="user_request.create">
7483                     <context link="usr" field="home_ou"/>
7484                                 </create>
7485                 <retrieve permission="user_request.view">
7486                     <context link="usr" field="home_ou"/>
7487                                 </retrieve>
7488                 <update permission="user_request.update">
7489                     <context link="usr" field="home_ou"/>
7490                                 </update>
7491                 <delete permission="user_request.delete">
7492                     <context link="usr" field="home_ou"/>
7493                                 </delete>
7494             </actions>
7495         </permacrud>
7496         </class>
7497
7498         <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">
7499                 <fields oils_persist:primary="code">
7500                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7501                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7502                 </fields>
7503                 <links/>
7504         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7505             <actions>
7506                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7507                 <retrieve/>
7508                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7509                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7510             </actions>
7511         </permacrud>
7512         </class>
7513
7514         <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">
7515                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7516                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7517                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7518                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7519                         <field reporter:label="Ratio" name="ratio" />
7520                 </fields>
7521                 <links>
7522                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7523                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7524                 </links>
7525                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7526                         <actions>
7527                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7528                                 <retrieve/>
7529                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7530                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7531                         </actions>
7532                 </permacrud>
7533         </class>
7534
7535         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7536                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7537                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7538                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7539                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7540                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7541                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7542                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7543                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7544                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7545                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7546                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7547                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7548                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7549                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7550                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7551                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7552                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7553                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7554                 </fields>
7555                 <links>
7556                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7557                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7558             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7559             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7560             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7561                 </links>
7562         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7563             <actions>
7564                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7565                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7566                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7567                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7568             </actions>
7569         </permacrud>
7570         </class>
7571
7572         <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">
7573                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7574                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7575                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7576                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7577                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7578                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7579                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7580                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7581                 </fields>
7582                 <links>
7583                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7584                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7585                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7586                 </links>
7587         </class>
7588
7589         <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">
7590                 <fields oils_persist:primary="code">
7591                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7592                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7593                 </fields>
7594                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7595             <actions>
7596                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7597                 <retrieve/>
7598                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7599                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7600             </actions>
7601                 </permacrud>
7602         </class>
7603
7604         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7605                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7606                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7607                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7608                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7609                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7610                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7611                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7612                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7613                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7614                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7615                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7616                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7617                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7618                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7619                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7620                 </fields>
7621                 <links>
7622                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7623                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7624                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7625                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7626                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7627                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7628                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7629                 </links>
7630         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7631             <actions>
7632                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7633                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7634                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7635                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7636             </actions>
7637         </permacrud>
7638         </class>
7639
7640         <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">
7641                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7642                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7643                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7644                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7645                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7646                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7647                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7648                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7649                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7650                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7651                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7652                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7653                 </fields>
7654                 <links>
7655                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7656                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7657                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7658                 </links>
7659         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7660             <actions>
7661                 <create   permission="ADMIN_INVOICE">
7662                                         <context link="invoice" field="receiver"/>
7663                                 </create>
7664                 <retrieve permission="ADMIN_INVOICE">
7665                                         <context link="invoice" field="receiver"/>
7666                                 </retrieve>
7667                 <update   permission="ADMIN_INVOICE">
7668                                         <context link="invoice" field="receiver"/>
7669                                 </update>
7670                                 <delete   permission="ADMIN_INVOICE">
7671                                         <context link="invoice" field="receiver"/>
7672                                 </delete>
7673             </actions>
7674         </permacrud>
7675         </class>
7676
7677         <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">
7678                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7679                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7680                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7681                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7682                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7683                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7684                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7685                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7686                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7687                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7688                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7689                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7690                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7691                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7692                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7693                 </fields>
7694                 <links>
7695                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7696                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7697                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7698                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7699                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7700                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7701                 </links>
7702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7703             <actions>
7704                 <create   permission="ADMIN_INVOICE">
7705                                         <context link="invoice" field="receiver"/>
7706                                 </create>
7707                 <retrieve permission="ADMIN_INVOICE">
7708                                         <context link="invoice" field="receiver"/>
7709                                 </retrieve>
7710                 <update   permission="ADMIN_INVOICE">
7711                                         <context link="invoice" field="receiver"/>
7712                                 </update>
7713                                 <delete   permission="ADMIN_INVOICE">
7714                                         <context link="invoice" field="receiver"/>
7715                                 </delete>
7716             </actions>
7717         </permacrud>
7718         </class>
7719
7720         <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">
7721                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7722                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7723                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7724                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7725                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7726                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7727                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7728                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7729                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7730                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7731                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7732                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7733                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7734                 </fields>
7735                 <links>
7736                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7737                 </links>
7738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7739             <actions>
7740                 <create permission="ADMIN_PROVIDER">
7741                     <context link="provider" field="owner"/>
7742                 </create>
7743                 <retrieve permission="ADMIN_PROVIDER">
7744                     <context link="provider" field="owner"/>
7745                 </retrieve>
7746                 <update permission="ADMIN_PROVIDER">
7747                     <context link="provider" field="owner"/>
7748                 </update>
7749                 <delete permission="ADMIN_PROVIDER">
7750                     <context link="provider" field="owner"/>
7751                 </delete>
7752             </actions>
7753         </permacrud>
7754         </class>
7755
7756         <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">
7757                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7758                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7759                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7760                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7761                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7762                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7763                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7764         </fields>
7765                 <links>
7766                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7767                 </links>
7768         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7769             <actions>
7770                 <create permission="ADMIN_PROVIDER">
7771                     <context link="provider" field="owner"/>
7772                 </create>
7773                 <retrieve permission="ADMIN_PROVIDER">
7774                     <context link="provider" field="owner"/>
7775                 </retrieve>
7776                 <update permission="ADMIN_PROVIDER">
7777                     <context link="provider" field="owner"/>
7778                 </update>
7779                 <delete permission="ADMIN_PROVIDER">
7780                     <context link="provider" field="owner"/>
7781                 </delete>
7782             </actions>
7783         </permacrud>
7784     </class>
7785         <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">
7786                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7787                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7788                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7789                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7790                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7791                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7792                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7793                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7794                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7795                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7796                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7797                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7798                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7799                 </fields>
7800                 <links>
7801                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7802                 </links>
7803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7804             <actions>
7805                 <create permission="ADMIN_PROVIDER">
7806                     <context link="contact" jump='provider' field="owner"/>
7807                 </create>
7808                 <retrieve permission="ADMIN_PROVIDER">
7809                     <context link="contact" jump='provider' field="owner"/>
7810                 </retrieve>
7811                 <update permission="ADMIN_PROVIDER">
7812                     <context link="contact" jump='provider' field="owner"/>
7813                 </update>
7814                 <delete permission="ADMIN_PROVIDER">
7815                     <context link="contact" jump='provider' field="owner"/>
7816                 </delete>
7817             </actions>
7818         </permacrud>
7819         </class>
7820
7821         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7822                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7823                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7824                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7825                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7826                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7827                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7828                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7829                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7830                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7831                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7832                 </fields>
7833                 <links>
7834                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7835                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7836                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7837                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7838                 </links>
7839         </class>
7840
7841         <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">
7842                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7843                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7844                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7845                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7846                 </fields>
7847                 <links>
7848             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7849                 </links>
7850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7851                         <actions>
7852                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7853                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7854                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7855                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7856                         </actions>
7857                 </permacrud>
7858         </class>
7859
7860         <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">
7861                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7862                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7863                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7864                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7865                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7866                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7867                 </fields>
7868                 <links>
7869                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7870                 </links>
7871                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7872                         <actions>
7873                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7874                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7875                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7876                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7877                         </actions>
7878                 </permacrud>
7879         </class>
7880
7881         <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">
7882                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7883                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7884                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7885                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7886                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7887                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7888                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7889                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7890                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7891                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7892                 </fields>
7893                 <links>
7894                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7895                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7896             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7897             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7898                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7899                 </links>
7900         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7901             <actions>
7902                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7903                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7904                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7905                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7906             </actions>
7907         </permacrud>
7908         </class>
7909
7910         <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">
7911                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7912                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7913                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7914                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7915                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7916                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7917                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7918                 </fields>
7919                 <links>
7920                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7921                 </links>
7922                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7923                         <actions>
7924                                 <create permission="ADMIN_FUNDING_SOURCE">
7925                     <context link="funding_source" field="owner"/>
7926                 </create>
7927                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7928                     <context link="funding_source" field="owner"/>
7929                 </retrieve>
7930                                 <update permission="ADMIN_FUNDING_SOURCE">
7931                     <context link="funding_source" field="owner"/>
7932                 </update>
7933                                 <delete permission="ADMIN_FUNDING_SOURCE">
7934                     <context link="funding_source" field="owner"/>
7935                 </delete>
7936                         </actions>
7937                 </permacrud>
7938         </class>
7939
7940         <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">
7941                 <fields oils_persist:primary="id">
7942                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7943                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7944                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7945                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7946                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7947                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7948                 </fields>
7949                 <links>
7950                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7951                 </links>
7952         </class>
7953
7954         <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">
7955                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7956                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7957                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7958                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7959                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7960                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7961                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7962                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7963                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7964                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
7965                 </fields>
7966                 <links>
7967                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7968                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7969                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
7970                 </links>
7971                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7972                         <actions>
7973                                 <create permission="ADMIN_ACQ_FUND">
7974                     <context link="fund" field="org"/>
7975                 </create>
7976                                 <retrieve permission="ADMIN_ACQ_FUND">
7977                     <context link="fund" field="org"/>
7978                 </retrieve>
7979                                 <update permission="ADMIN_ACQ_FUND">
7980                     <context link="fund" field="org"/>
7981                 </update>
7982                                 <delete permission="ADMIN_ACQ_FUND">
7983                     <context link="fund" field="org"/>
7984                 </delete>
7985                         </actions>
7986                 </permacrud>
7987         </class>
7988
7989         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7990                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7991                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7992                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7993                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7994                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7995                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7996                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7997                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7998                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7999                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
8000                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8001                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8002                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
8003                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8004                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8005                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8006                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8007                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8008                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8009                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8010                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8011                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8012                 </fields>
8013                 <links>
8014                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8015                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8016             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8017             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8018             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8019             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8020             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8021             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8022             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8023             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8024             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8025                 </links>
8026         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8027             <actions>
8028                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8029                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8030                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8031                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8032             </actions>
8033         </permacrud>
8034         </class>
8035
8036         <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">
8037                 <fields oils_persist:primary="fund">
8038                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8039                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8040                 </fields>
8041                 <links>
8042                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8043                 </links>
8044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8045             <actions>
8046                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8047                                         <context link="fund" field="org" />
8048                 </retrieve>
8049             </actions>
8050         </permacrud>
8051         </class>
8052
8053         <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">
8054                 <fields oils_persist:primary="fund">
8055                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8056                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8057                 </fields>
8058                 <links>
8059                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8060                 </links>
8061         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8062             <actions>
8063                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8064                                         <context link="fund" field="org" />
8065                 </retrieve>
8066             </actions>
8067         </permacrud>
8068         </class>
8069
8070         <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">
8071                 <fields oils_persist:primary="fund">
8072                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8073                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8074                 </fields>
8075                 <links>
8076                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8077                 </links>
8078         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8079             <actions>
8080                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8081                                         <context link="fund" field="org" />
8082                 </retrieve>
8083             </actions>
8084         </permacrud>
8085         </class>
8086
8087         <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">
8088                 <fields oils_persist:primary="fund">
8089                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8090                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8091                 </fields>
8092                 <links>
8093                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8094                 </links>
8095         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8096             <actions>
8097                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8098                                         <context link="fund" field="org" />
8099                 </retrieve>
8100             </actions>
8101         </permacrud>
8102         </class>
8103
8104         <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">
8105                 <fields oils_persist:primary="fund">
8106                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8107                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8108                 </fields>
8109                 <links>
8110                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8111                 </links>
8112         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8113             <actions>
8114                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8115                                         <context link="fund" field="org" />
8116                 </retrieve>
8117             </actions>
8118         </permacrud>
8119         </class>
8120
8121    <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">
8122         <fields oils_persist:primary="fund">
8123             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8124             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8125         </fields>
8126         <links>
8127             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8128         </links>
8129     </class>
8130
8131    <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">
8132         <fields oils_persist:primary="fund">
8133             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8134             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8135         </fields>
8136         <links>
8137             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8138         </links>
8139     </class>
8140
8141    <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">
8142         <fields oils_persist:primary="fund">
8143             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8144             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8145         </fields>
8146         <links>
8147             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8148         </links>
8149     </class>
8150
8151    <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">
8152         <fields oils_persist:primary="fund">
8153             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8154             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8155         </fields>
8156         <links>
8157             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8158         </links>
8159     </class>
8160
8161    <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">
8162         <fields oils_persist:primary="fund">
8163             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8164             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8165         </fields>
8166         <links>
8167             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8168         </links>
8169     </class>
8170
8171         <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">
8172                 <fields oils_persist:primary="funding_source">
8173                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8174                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8175                 </fields>
8176                 <links>
8177                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8178                 </links>
8179         </class>
8180
8181         <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">
8182                 <fields oils_persist:primary="funding_source">
8183                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8184                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8185                 </fields>
8186                 <links>
8187                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8188                 </links>
8189         </class>
8190
8191         <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">
8192                 <fields oils_persist:primary="funding_source">
8193                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8194                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8195                 </fields>
8196                 <links>
8197                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8198                 </links>
8199         </class>
8200
8201         <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">
8202                 <fields oils_persist:primary="fund">
8203                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8204                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8205                 </fields>
8206                 <links>
8207                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8208                 </links>
8209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8210             <actions>
8211                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8212                                         <context link="fund" field="org" />
8213                 </retrieve>
8214             </actions>
8215         </permacrud>
8216     </class>
8217     <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">
8218         <oils_persist:source_definition><![CDATA[
8219             SELECT
8220                 acqf.*,
8221                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8222                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8223                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8224                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8225             FROM
8226                 acq.fund acqf
8227                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8228                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8229                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8230                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8231         ]]></oils_persist:source_definition>
8232         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8233             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8234             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8235             <field reporter:label="Name" name="name" reporter:datatype="text" />
8236             <field reporter:label="Year" name="year" reporter:datatype="int" />
8237             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8238             <field reporter:label="Code" name="code" reporter:datatype="text" />
8239             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8240             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8241             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8242             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8243             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8244
8245             <!-- non fund-native fields -->
8246             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8247             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8248             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8249             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8250         </fields>
8251         <links>
8252             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8253             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8254             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8255         </links>
8256         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8257             <actions>
8258                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8259             </actions>
8260         </permacrud>
8261         </class>
8262         <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">
8263                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8264                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8265                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8266                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8267                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8268                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8269                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8270                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8271                 </fields>
8272                 <links>
8273                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8274                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8275                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8276                 </links>
8277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8278                         <actions>
8279                                 <create permission="ADMIN_ACQ_FUND">
8280                     <context link="fund" field="org"/>
8281                 </create>
8282                                 <retrieve permission="ADMIN_ACQ_FUND">
8283                     <context link="fund" field="org"/>
8284                 </retrieve>
8285                                 <update permission="ADMIN_ACQ_FUND">
8286                     <context link="fund" field="org"/>
8287                 </update>
8288                                 <delete permission="ADMIN_ACQ_FUND">
8289                     <context link="fund" field="org"/>
8290                 </delete>
8291                         </actions>
8292                 </permacrud>
8293         </class>
8294
8295     <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">
8296         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8297             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8298             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8299             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8300             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8301             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8302             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8303             <field reporter:label="Note" name="note" reporter:datatype="text" />
8304             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8305         </fields>
8306         <links>
8307             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8308             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8309             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8310         </links>
8311                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8312                         <actions>
8313                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8314                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8315                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8316                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8317                         </actions>
8318                 </permacrud>
8319     </class>
8320
8321         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8322                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8323                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8324                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8325                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8326                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8327                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8328                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8329                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8330                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8331                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8332                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8333                 </fields>
8334                 <links>
8335                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8336                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8337                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8338                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8339                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8340                 </links>
8341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8342                         <actions>
8343                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8344                         </actions>
8345                 </permacrud>
8346         </class>
8347
8348         <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">
8349                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8350                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8351                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8352                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8353                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8354                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8355                 </fields>
8356                 <links>
8357                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8358                 </links>
8359                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8360                         <actions>
8361                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8362                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8363                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8364                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8365                         </actions>
8366                 </permacrud>
8367         </class>
8368
8369         <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">
8370                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8371                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8372                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8373                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8374                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8375                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8376                         <field reporter:label="State" name="state" reporter:datatype="text" />
8377                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8378                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8379                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8380                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8381                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8382                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8383                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8384                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8385                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8386                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8387                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8388                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8389                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8390                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8391                 </fields>
8392                 <links>
8393                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8394                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8395                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8396                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8397                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8398                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8399                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8400                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8401                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8402                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8403                 </links>
8404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8405                         <actions>
8406                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8407                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8408                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8409                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8410                         </actions>
8411                 </permacrud>
8412         </class>
8413
8414         <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">
8415                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8416                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8417                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8418                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8419                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8420                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8421                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8422                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8423                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8424                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8425                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8426                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8427                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8428                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8429                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8430                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8431                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8432                 </fields>
8433                 <links>
8434                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8435                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8436                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8437                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8438                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8439                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8440                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8441                 </links>
8442                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8443             <actions>
8444                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8445             </actions>
8446                 </permacrud>
8447         </class>
8448
8449         <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">
8450                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8451                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8452                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8453                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8454                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8455                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8456                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8457                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8458                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8459                 </fields>
8460                 <links>
8461                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8462                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8463                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8464                 </links>
8465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8466             <actions>
8467                 <create permission="CREATE_PURCHASE_ORDER">
8468                     <context link="purchase_order" field="ordering_agency"/>
8469                 </create>
8470                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8471                     <context link="purchase_order" field="ordering_agency"/>
8472                 </retrieve>
8473                 <update permission="CREATE_PURCHASE_ORDER">
8474                     <context link="purchase_order" field="ordering_agency"/>
8475                 </update>
8476                 <delete permission="CREATE_PURCHASE_ORDER">
8477                     <context link="purchase_order" field="ordering_agency"/>
8478                 </delete>
8479             </actions>
8480                 </permacrud>
8481         </class>
8482
8483         <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">
8484                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8485                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8486                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8487                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8488                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8489                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8490                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8491                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8492                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8493                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8494                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8495                 </fields>
8496                 <links>
8497                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8498                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8499                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8500                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8501                 </links>
8502                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8503             <actions>
8504                 <create permission="CREATE_PURCHASE_ORDER">
8505                     <context link="purchase_order" field="ordering_agency"/>
8506                 </create>
8507                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8508                     <context link="purchase_order" field="ordering_agency"/>
8509                 </retrieve>
8510                 <update permission="CREATE_PURCHASE_ORDER">
8511                     <context link="purchase_order" field="ordering_agency"/>
8512                 </update>
8513                 <delete permission="CREATE_PURCHASE_ORDER">
8514                     <context link="purchase_order" field="ordering_agency"/>
8515                 </delete>
8516             </actions>
8517                 </permacrud>
8518         </class>
8519
8520         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8521                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8522                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8523                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8524                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8525                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8526                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8527                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8528                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8529                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8530                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8531                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8532                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8533                         <field reporter:label="State" name="state" reporter:datatype="text" />
8534                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8535                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8536                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8537                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8538                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8539                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8540                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8541                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8542                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8543                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8544                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8545                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8546                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8547                 </fields>
8548                 <links>
8549                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8550                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8551                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8552                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8553                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8554                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8555                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8556                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8557                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8558                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8559                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8560                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8561                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8562                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8563                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8564                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8565                 </links>
8566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8567                         <actions>
8568                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8569                                         <context link="purchase_order" field="ordering_agency"/>
8570                                         <context link="picklist" field="org_unit"/>
8571                                 </retrieve>
8572                         </actions>
8573                 </permacrud>
8574         </class>
8575
8576         <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">
8577                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8578                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8579                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8580                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8581                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8582                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8583                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8584                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8585                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8586                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8587                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8588                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8589                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8590                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8591                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8592                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8593                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8594                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8595                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8596                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8597                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8598                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8599                 </fields>
8600                 <links>
8601                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8602                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8603                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8604                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8605                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8606                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8607                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8608                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8609                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8610                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8611                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8612                 </links>
8613                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8614                         <actions>
8615                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8616                                         <context link="purchase_order" field="ordering_agency"/>
8617                                         <context link="picklist" field="org_unit"/>
8618                                 </retrieve>
8619                         </actions>
8620                 </permacrud>
8621         </class>
8622
8623         <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">
8624                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8625                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8626                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8627                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8628                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8629                 </fields>
8630                 <links>
8631                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8632                 </links>
8633                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8634                         <actions>
8635                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8636                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8637                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8638                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8639                         </actions>
8640                 </permacrud>
8641         </class>
8642
8643         <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">
8644                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8645                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8646                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8647                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8648                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8649                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8650                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8651                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8652                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8653                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8654                 </fields>
8655                 <links>
8656                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8657                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8658                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8659                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8660                 </links>
8661         </class>
8662
8663         <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">
8664                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8665                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8666                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8667                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8668                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8669                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8670                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8671                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8672                 </fields>
8673                 <links>
8674                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8675                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8676                 </links>
8677         </class>
8678
8679         <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">
8680                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8681                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8682                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8683                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8684                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8685                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8686                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8687                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8688                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8689                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8690                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8691                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8692                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8693                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8694                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8695                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8696                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8697                 </fields>
8698                 <links>
8699                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8700                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8701                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8702                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8703                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8704                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8705                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8706                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8707                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8708                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8709                 </links>
8710         </class>
8711
8712         <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">
8713                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8714                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8715                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8716                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8717                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8718                 </fields>
8719                 <links/>
8720                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8721                         <actions>
8722                                 <retrieve />
8723                         </actions>
8724                 </permacrud>
8725         </class>
8726
8727         <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">
8728                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8729                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8730                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8731                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8732                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8733                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8734             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8735                 </fields>
8736                 <links/>
8737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8738             <actions>
8739                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8740                 <retrieve />
8741                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8742                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8743             </actions>
8744         </permacrud>
8745         </class>
8746
8747         <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">
8748                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8749                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8750                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8751                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8752                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8753                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8754                 </fields>
8755                 <links/>
8756         </class>
8757         <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">
8758                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8759                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8760                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8761                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8762                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8763                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8764                 </fields>
8765                 <links>
8766                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8767                 </links>
8768         </class>
8769
8770         <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">
8771             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8772                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8773                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8774                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8775                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8776                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8777                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8778         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8779
8780             </fields>
8781             <links>
8782                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8783             </links>
8784             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8785                 <actions>
8786                     <create permission="ADMIN_PROVIDER">
8787                         <context link="provider" field="owner"/>
8788                     </create>
8789                     <retrieve permission="ADMIN_PROVIDER">
8790                         <context link="provider" field="owner"/>
8791                     </retrieve>
8792                     <update permission="ADMIN_PROVIDER">
8793                         <context link="provider" field="owner"/>
8794                     </update>
8795                     <delete permission="ADMIN_PROVIDER">
8796                         <context link="provider" field="owner"/>
8797                     </delete>
8798                 </actions>
8799             </permacrud>
8800         </class>
8801         
8802         <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">
8803             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8804                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8805                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8806                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8807                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8808             </fields>
8809             <links>
8810                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8811             </links>
8812             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8813                 <actions>
8814                     <create permission="ADMIN_PROVIDER">
8815                         <context link="provider" field="owner"/>
8816                     </create>
8817                     <retrieve permission="ADMIN_PROVIDER">
8818                         <context link="provider" field="owner"/>
8819                     </retrieve>
8820                     <update permission="ADMIN_PROVIDER">
8821                         <context link="provider" field="owner"/>
8822                     </update>
8823                     <delete permission="ADMIN_PROVIDER">
8824                         <context link="provider" field="owner"/>
8825                     </delete>
8826                 </actions>
8827             </permacrud>
8828         </class>
8829         
8830         <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">
8831             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8832                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8833                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8834                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8835                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8836                 </fields>
8837                 <links/>
8838         </class>
8839
8840         <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">
8841                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8842                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8843                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8844                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8845                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8846                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8847                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8848                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8849                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8850                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8851                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8852                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8853                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8854                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8855                 </fields>
8856                 <links>
8857                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8858                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8859                 </links>
8860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8861             <actions>
8862                 <create permission="ADMIN_PROVIDER">
8863                     <context link="provider" field="owner"/>
8864                 </create>
8865                 <retrieve permission="ADMIN_PROVIDER">
8866                     <context link="provider" field="owner"/>
8867                 </retrieve>
8868                 <update permission="ADMIN_PROVIDER">
8869                     <context link="provider" field="owner"/>
8870                 </update>
8871                 <delete permission="ADMIN_PROVIDER">
8872                     <context link="provider" field="owner"/>
8873                 </delete>
8874             </actions>
8875         </permacrud>
8876         </class>
8877
8878         <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">
8879                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8880                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8881                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8882                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8883                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8884                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8885                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8886                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8887                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8888                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8889                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8890                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8891                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8892                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8893                 </fields>
8894                 <links>
8895                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8896                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8897                 </links>
8898         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8899             <actions>
8900                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8901                     <context link="account" jump="provider" field="owner"/>
8902                 </retrieve>
8903                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8904                     <context link="account" jump="provider" field="owner"/>
8905                 </update>
8906                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8907                     <context link="account" jump="provider" field="owner"/>
8908                 </delete>
8909             </actions>
8910         </permacrud>
8911         </class>
8912
8913
8914         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8915                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8916                         <field name="id" reporter:datatype="id" />
8917                         <field name="parent" reporter:datatype="link"/>
8918                         <field name="owner" reporter:datatype="link"/>
8919                         <field name="create_time" reporter:datatype="timestamp"/>
8920                         <field name="name" reporter:datatype="text"/>
8921                         <field name="shared" reporter:datatype="bool"/>
8922                         <field name="share_with" reporter:datatype="link"/>
8923                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8924                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8925                 </fields>
8926                 <links>
8927                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8928                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8929                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8930                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8931                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8932                 </links>
8933         </class>
8934         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8935                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8936                         <field name="id" reporter:datatype="id" />
8937                         <field name="parent" reporter:datatype="link"/>
8938                         <field name="owner" reporter:datatype="link"/>
8939                         <field name="create_time" reporter:datatype="timestamp"/>
8940                         <field name="name" reporter:datatype="text"/>
8941                         <field name="shared" reporter:datatype="bool"/>
8942                         <field name="share_with" reporter:datatype="link"/>
8943                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8944                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8945                 </fields>
8946                 <links>
8947                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8948                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8949                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8950                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8951                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8952                 </links>
8953         </class>
8954         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8955                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8956                         <field name="id" reporter:datatype="id" />
8957                         <field name="parent" reporter:datatype="link"/>
8958                         <field name="owner" reporter:datatype="link"/>
8959                         <field name="create_time" reporter:datatype="timestamp"/>
8960                         <field name="name" reporter:datatype="text"/>
8961                         <field name="shared" reporter:datatype="bool"/>
8962                         <field name="share_with" reporter:datatype="link"/>
8963                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8964                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8965                 </fields>
8966                 <links>
8967                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8968                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8969                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8970                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8971                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8972                 </links>
8973         </class>
8974         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8975                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8976                         <field name="id" reporter:datatype="id" />
8977                         <field name="owner" reporter:datatype="link"/>
8978                         <field name="create_time" reporter:datatype="timestamp"/>
8979                         <field name="name" reporter:datatype="text"/>
8980                         <field name="data" reporter:datatype="text"/>
8981                         <field name="folder" reporter:datatype="link"/>
8982                         <field name="description" reporter:datatype="text"/>
8983                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8984                 </fields>
8985                 <links>
8986                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8987                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8988                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8989                 </links>
8990         </class>
8991         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8992                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8993                         <field name="id" reporter:datatype="id" />
8994                         <field name="owner" reporter:datatype="link"/>
8995                         <field name="create_time" reporter:datatype="timestamp"/>
8996                         <field name="template" reporter:datatype="link"/>
8997                         <field name="data" reporter:datatype="text"/>
8998                         <field name="folder" reporter:datatype="link"/>
8999                         <field name="recur" reporter:datatype="bool"/>
9000                         <field name="recurrence" reporter:datatype="interval"/>
9001                         <field name="name" reporter:datatype="text"/>
9002                         <field name="description" reporter:datatype="text"/>
9003                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9004                 </fields>
9005                 <links>
9006                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9007                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9008                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9009                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9010                 </links>
9011         </class>
9012         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9013                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9014                         <field name="id" reporter:datatype="id" />
9015                         <field name="runner" reporter:datatype="link"/>
9016                         <field name="start_time" reporter:datatype="timestamp"/>
9017                         <field name="complete_time" reporter:datatype="timestamp"/>
9018                         <field name="run_time" reporter:datatype="timestamp"/>
9019                         <field name="email" reporter:datatype="text"/>
9020                         <field name="excel_format" reporter:datatype="bool"/>
9021                         <field name="csv_format" reporter:datatype="bool"/>
9022                         <field name="html_format" reporter:datatype="bool"/>
9023                         <field name="error_code" reporter:datatype="int"/>
9024                         <field name="error_text" reporter:datatype="text"/>
9025                         <field name="report" reporter:datatype="link"/>
9026                         <field name="folder" reporter:datatype="link"/>
9027                         <field name="chart_pie" reporter:datatype="bool"/>
9028                         <field name="chart_bar" reporter:datatype="bool"/>
9029                         <field name="chart_line" reporter:datatype="bool"/>
9030                 </fields>
9031                 <links>
9032                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9033                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9034                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9035                 </links>
9036         </class>
9037         <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">
9038                 <fields oils_persist:primary="id">
9039                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9040                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9041                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9042                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9043                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9044                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9045                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9046                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9047                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9048                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9049                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9050                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9051                 </fields>
9052                 <links>
9053                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9054                 </links>
9055                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9056                         <actions>
9057                                 <retrieve />
9058                         </actions>
9059                 </permacrud>
9060         </class>
9061         <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">
9062                 <fields oils_persist:primary="id">
9063                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9064                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9065                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9066                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9067                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9068                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9069                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9070                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9071                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9072                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9073                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9074                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9075                 </fields>
9076                 <links>
9077                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9078                 </links>
9079         </class>
9080         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9081                 <fields oils_persist:primary="id">
9082                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9083                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9084                         <field reporter:label="Fingerprint" name="fingerprint" />
9085                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9086                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9087                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9088                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9089                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9090                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9091                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9092                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9093                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9094                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9095                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9096                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9097                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9098                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9099                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9100                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9101                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9102                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9103                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9104                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9105                 </fields>
9106                 <links>
9107                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9108                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9109                 </links>
9110         </class>
9111         <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">
9112                 <fields oils_persist:primary="id">
9113                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9114                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9115                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9116                 </fields>
9117                 <links>
9118                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9119                 </links>
9120         </class>
9121         <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">
9122                 <fields oils_persist:primary="id">
9123                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9124                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9125                 </fields>
9126                 <links>
9127                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9128                 </links>
9129         </class>
9130         <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">
9131                 <fields oils_persist:primary="id">
9132                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9133                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9134                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9135                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9136                 </fields>
9137                 <links>
9138                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9139                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9140                 </links>
9141         </class>
9142         <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">
9143                 <fields oils_persist:primary="xact">
9144                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9145                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9146                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9147                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9148                 </fields>
9149                 <links>
9150                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9151                 </links>
9152         </class>
9153         <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">
9154                 <fields oils_persist:primary="xact">
9155                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9156                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9157                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9158                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9159                 </fields>
9160                 <links>
9161                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9162                 </links>
9163         </class>
9164         <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)">
9165                 <fields oils_persist:primary="id">
9166                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9167                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9168                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9169                 </fields>
9170                 <links>
9171                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9172                 </links>
9173         </class>
9174         <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">
9175                 <fields oils_persist:primary="id">
9176                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9177                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9178                 </fields>
9179                 <links>
9180                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9181                 </links>
9182         </class>
9183         <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">
9184                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9185                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9186                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9187                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9188                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9189                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9190                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9191                 </fields>
9192                 <links>
9193                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9194                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9195                 </links>
9196                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9197                         <actions>
9198                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9199                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9200                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9201                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9202                         </actions>
9203                 </permacrud>
9204         </class>
9205         <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">
9206                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9207                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9208                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9209                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9210                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9211                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9212                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9213                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9214                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9215                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9216                 </fields>
9217                 <links>
9218                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9219                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9220                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9221                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9222                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9223                 </links>
9224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9225                         <actions>
9226                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9227                                         <context link="formula" field="owner"/>
9228                                 </create>
9229                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9230                                         <context link="formula" field="owner"/>
9231                                 </retrieve>
9232                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9233                                         <context link="formula" field="owner"/>
9234                                 </update>
9235                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9236                                         <context link="formula" field="owner"/>
9237                                 </delete>
9238                         </actions>
9239                 </permacrud>
9240         </class>
9241
9242         <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">
9243                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9244                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9245                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9246                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9247                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9248                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9249                 </fields>
9250                 <links>
9251                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9252                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9253                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9254                 </links>
9255                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9256                         <actions>
9257                                 <create permission="CREATE_PURCHASE_ORDER">
9258                                         <context link="formula" field="owner"/>
9259                 </create>
9260                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9261                                         <context link="formula" field="owner"/>
9262                 </retrieve>
9263                                 <update permission="CREATE_PURCHASE_ORDER">
9264                                         <context link="formula" field="owner"/>
9265                 </update>
9266                                 <delete permission="CREATE_PURCHASE_ORDER">
9267                                         <context link="formula" field="owner"/>
9268                 </delete>
9269                         </actions>
9270                 </permacrud>
9271         </class>
9272
9273         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9274                 <fields oils_persist:primary="id">
9275                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9276                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9277                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9278                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9279                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9280                 </fields>
9281                 <links>
9282                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9283                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9284                 </links>
9285         </class>
9286
9287         <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">
9288                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9289                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9290                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9291                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9292                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9293                 </fields>
9294                 <links>
9295                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9296                 </links>
9297                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9298                         <actions>
9299                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9300                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9301                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9302                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9303                         </actions>
9304                 </permacrud>
9305         </class>
9306
9307         <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">
9308                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9309                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9310                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9311                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9312                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9313                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9314                 </fields>
9315                 <links>
9316                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9317                 </links>
9318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9319                         <actions>
9320                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9321                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9322                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9323                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9324                         </actions>
9325                 </permacrud>
9326         </class>
9327
9328         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9329                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9330                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9331                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9332                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9333                 </fields>
9334                 <links>
9335                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9336                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9337                 </links>
9338         </class>
9339
9340         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9341                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9342                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9343                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9344                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9345                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9346                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9347                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9348                 </fields>
9349                 <links>
9350                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9351                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9352                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9353                 </links>
9354         </class>
9355
9356         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9357                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9358                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9359                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9360                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9361                 </fields>
9362                 <links>
9363                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9364                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9365                 </links>
9366         </class>
9367
9368         <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">
9369                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9370                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9371                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9372                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9373                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9374                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9375                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9376                 </fields>
9377                 <links>
9378                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9379                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9380                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9381                 </links>
9382         </class>
9383
9384         <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">
9385                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9386                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9387                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9388                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9389                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9390                 </fields>
9391                 <links>
9392                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9393                 </links>
9394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9395             <actions>
9396                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9397                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9398                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9399                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9400             </actions>
9401                 </permacrud>
9402         </class>
9403
9404         <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">
9405                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9406                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9407                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9408                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9409                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9410                 </fields>
9411                 <links>
9412                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9413                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9414                 </links>
9415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9416                         <actions>
9417                                 <create permission="ADMIN_CLAIM_POLICY">
9418                                         <context link="claim_policy" field="org_unit"/>
9419                 </create>
9420                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9421                                         <context link="claim_policy" field="org_unit"/>
9422                 </retrieve>
9423                                 <update permission="ADMIN_CLAIM_POLICY">
9424                                         <context link="claim_policy" field="org_unit"/>
9425                 </update>
9426                                 <delete permission="ADMIN_CLAIM_POLICY">
9427                                         <context link="claim_policy" field="org_unit"/>
9428                 </delete>
9429                         </actions>
9430                 </permacrud>
9431         </class>
9432
9433     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9434         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9435             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9436             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9437             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9438             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9439             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9440             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9441             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9442             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9443             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9444             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9445             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9446             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9447             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9448             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9449             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9450             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9451         </fields>
9452         <links>
9453             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9454         </links>
9455     </class>
9456
9457     <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">
9458         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9459             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9460             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9461             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9462             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9463             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9464         </fields>
9465     </class>
9466
9467     <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">
9468         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9469             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9470             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9471             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9472             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9473             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9474             <field reporter:label="City" name="city" reporter:datatype="text"/>
9475             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9476             <field reporter:label="State" name="state" reporter:datatype="text"/>
9477             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9478             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9479             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9480         </fields>
9481     </class>
9482
9483     <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">
9484         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9485             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9486             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9487             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9488             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9489             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9490             <field reporter:label="City" name="city" reporter:datatype="text"/>
9491             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9492             <field reporter:label="State" name="state" reporter:datatype="text"/>
9493             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9494             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9495             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9496         </fields>
9497     </class>
9498
9499     <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">
9500         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9501             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9502             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9503             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9504             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9505             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9506             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9507         </fields>
9508     </class>
9509
9510         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9511                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9512                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9513                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9514                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9515                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9516                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9517                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9518                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9519                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9520                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9521                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9522                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9523                 </fields>
9524                 <links>
9525                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9526                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9527                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9528                 </links>
9529         </class>
9530
9531         <class id="afscv" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset_col_val" oils_persist:tablename="action.fieldset_col_val" reporter:label="Fieldset Column Value">
9532                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9533                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9534                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9535                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9536                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9537                 </fields>
9538                 <links>
9539                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9540                 </links>
9541         </class>
9542
9543     <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">
9544         <fields>
9545             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9546             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9547             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9548         </fields>
9549                 <links>
9550                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9551                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9552                 </links>
9553     </class>
9554
9555     <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">
9556         <fields>
9557             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9558             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9559         </fields>
9560                 <links>
9561                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9562                 </links>
9563     </class>
9564
9565     <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">
9566         <fields>
9567             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9568             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9569             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9570         </fields>
9571                 <links>
9572                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9573                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9574                 </links>
9575     </class>
9576
9577     <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">
9578         <fields>
9579             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9580             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9581         </fields>
9582                 <links>
9583                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9584                 </links>
9585     </class>
9586
9587     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9588                 <oils_persist:source_definition>
9589
9590             SELECT  DISTINCT l.*
9591               FROM  action.unfulfilled_hold_loops l
9592                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9593               WHERE l.count = m.max
9594
9595                 </oils_persist:source_definition>
9596         <fields>
9597             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9598             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9599             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9600         </fields>
9601                 <links>
9602                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9603                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9604                 </links>
9605     </class>
9606
9607         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9608                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9609                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9610                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9611                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9612                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9613                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9614                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9615                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9616                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9617                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9618                 </fields>
9619                 <links>
9620                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9621                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9622                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9623                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9624                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9625                 </links>
9626         </class>
9627
9628         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9629                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9630                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9631                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9632                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9633                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9634                 </fields>
9635                 <links>
9636                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9637                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9638                 </links>
9639         </class>
9640
9641         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9642                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9643                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9644                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9645                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9646                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9647                 </fields>
9648                 <links>
9649                 </links>
9650         </class>
9651
9652         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9653                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9654                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9655                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9656                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9657                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9658                 </fields>
9659                 <links>
9660                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9661                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9662                 </links>
9663         </class>
9664         
9665         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9666                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9667                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9668                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9669                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9670                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9671                 </fields>
9672                 <links>
9673                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9674                 </links>
9675         </class>
9676         
9677         <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">
9678                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9679                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9680                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9681                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9682                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9683                 </fields>
9684                 <links>
9685                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9686                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9687                 </links>
9688         </class>
9689
9690         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9691                 <fields oils_persist:primary="name">
9692                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9693                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9694                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9695                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9696                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9697                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9698                 </fields>
9699                 <links>
9700                 </links>
9701         </class>
9702
9703         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9704                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9705                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9706                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9707                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9708                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9709                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9710                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9711                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9712                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9713                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9714                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9715                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9716                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9717                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9718                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9719                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9720                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9721                 </fields>
9722                 <links>
9723                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9724                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9725                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9726                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9727                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9728                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9729                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9730                 </links>
9731         </class>
9732
9733         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9734                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9735                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9736                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9737                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9738                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9739                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9740                 </fields>
9741                 <links>
9742                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9743                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9744                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9745                 </links>
9746         </class>
9747
9748         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9749                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9750                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9751                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9752                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9753                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9754                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9755                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9756                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9757                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9758                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9759                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9760                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9761                 </fields>
9762                 <links>
9763                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9764                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9765                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9766                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9767                 </links>
9768         </class>
9769
9770         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9771                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9772                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9773                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9774                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9775                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9776                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9777                 </fields>
9778                 <links>
9779                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9780                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9781                 </links>
9782         </class>
9783
9784         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9785                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9786                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9787                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9788                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9789                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9790                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9791                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9792                 </fields>
9793                 <links>
9794                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9795                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9796                 </links>
9797         </class>
9798
9799         <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">
9800                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9801                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9802                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9803                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9804                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9805                 </fields>
9806                 <links>
9807                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9808                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9809                 </links>
9810         </class>
9811
9812         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9813                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9814                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9815                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9816                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9817                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9818                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9819                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9820                 </fields>
9821                 <links>
9822                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9823                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9824                 </links>
9825         </class>
9826
9827         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9828                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9829                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9830                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9831                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9832                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9833                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9834                 </fields>
9835                 <links>
9836                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9837                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9838                 </links>
9839         </class>
9840
9841         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9842                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9843                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9844                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9845                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9846                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9847                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9848                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9849                 </fields>
9850                 <links>
9851                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9852                 </links>
9853         </class>
9854
9855         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9856                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9857                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9858                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9859                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9860                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9861                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9862                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9863                 </fields>
9864                 <links>
9865                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9866                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9867                 </links>
9868         </class>
9869
9870         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9871                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9872                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9873                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9874                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9875                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9876                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9877                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9878                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9879                 </fields>
9880                 <links>
9881                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9882                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9883                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9884                 </links>
9885         </class>
9886
9887         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9888                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9889                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9890                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9891                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9892                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9893                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9894                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9895                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9896                 </fields>
9897                 <links>
9898                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9899                 </links>
9900         </class>
9901
9902         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9903                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9904                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9905                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9906                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9907                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9908                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9909                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9910                 </fields>
9911                 <links>
9912                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9913                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9914                 </links>
9915         </class>
9916
9917         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9918                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9919                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9920                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9921                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9922                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9923                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9924                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9925                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9926                 </fields>
9927                 <links>
9928                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9929                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9930                 </links>
9931         </class>
9932
9933         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9934                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9935                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9936                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9937                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9938                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9939                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9940                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9941                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9942                 </fields>
9943                 <links>
9944                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9945                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9946                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9947                 </links>
9948         </class>
9949
9950         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9951                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9952                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9953                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9954                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9955                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9956                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9957                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9958                 </fields>
9959                 <links>
9960                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9961                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9962                 </links>
9963         </class>
9964
9965         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9966                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9967                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9968                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9969                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9970                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9971                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9972                 </fields>
9973                 <links>
9974                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9975                 </links>
9976         </class>
9977
9978         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9979                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9980                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9981                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9982                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9983                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9984                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9985                 </fields>
9986                 <links>
9987                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9988                 </links>
9989         </class>
9990
9991         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9992                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9993                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9994                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9995                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9996                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9997                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9998                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9999                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
10000                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10001                 </fields>
10002                 <links>
10003                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10004                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10005                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10006                 </links>
10007         </class>
10008
10009         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10010                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10011                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10012                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10013                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10014                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10015                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10016                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10017                 </fields>
10018                 <links>
10019                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10020                 </links>
10021         </class>
10022
10023         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10024                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10025                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10026                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10027                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10028                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10029                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10030                 </fields>
10031                 <links>
10032                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10033                 </links>
10034         </class>
10035
10036         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10037                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10038                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10039                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10040                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10041                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10042                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10043                 </fields>
10044                 <links>
10045                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10046                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10047                 </links>
10048         </class>
10049
10050         <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">
10051                 <fields oils_persist:primary="id">
10052                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10053                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10054                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10055                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10056                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10057                 </fields>
10058                 <links>
10059                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10060                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10061                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10062                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10063                 </links>
10064         </class>
10065
10066         <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">
10067                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10068                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10069                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10070                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10071                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10072                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10073                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10074                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10075                 </fields>
10076                 <links/>
10077                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10078                         <actions>
10079                                 <retrieve/>
10080                         </actions>
10081                 </permacrud>
10082         </class>
10083
10084         <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">
10085                 <fields oils_persist:primary="ptype_key">
10086                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10087                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10088                 </fields>
10089                 <links/>
10090                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10091                         <actions>
10092                                 <retrieve/>
10093                         </actions>
10094                 </permacrud>
10095         </class>
10096
10097         <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">
10098                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10099                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10100                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10101                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10102                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10103                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10104                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10105                 </fields>
10106                 <links>
10107                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10108                 </links>
10109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10110                         <actions>
10111                                 <retrieve/>
10112                         </actions>
10113                 </permacrud>
10114         </class>
10115
10116         <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">
10117                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10118                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10119                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10120                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10121                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10122                 </fields>
10123                 <links>
10124                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10125                 </links>
10126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10127                         <actions>
10128                                 <retrieve/>
10129                         </actions>
10130                 </permacrud>
10131         </class>
10132
10133     <class
10134         id="uvs"
10135         controller="open-ils.cstore open-ils.pcrud"
10136         oils_obj:fieldmapper="url_verify::session"
10137         oils_persist:tablename="url_verify.session"
10138         reporter:label="URL Verification Session"
10139     >
10140         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10141             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10142             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10143                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10144             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10145             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10146             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10147             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10148             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10149             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10150         </fields>
10151
10152         <links>
10153             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10154             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10155             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10156             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10157             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10158         </links>
10159
10160         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10161             <actions>
10162                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10163             </actions>
10164         </permacrud>
10165
10166     </class>
10167
10168     <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">
10169         <oils_persist:source_definition>
10170             SELECT
10171                 cbrebi.id AS id,  -- so we can have a pkey in our view
10172                 uvs.id AS session,
10173                 uvs.owning_lib,
10174                 cbrebi.target_biblio_record_entry
10175             FROM url_verify.session uvs
10176             JOIN container.biblio_record_entry_bucket cbreb
10177                 ON (uvs.container = cbreb.id)
10178             JOIN container.biblio_record_entry_bucket_item cbrebi
10179                 ON (cbrebi.bucket = cbreb.id)
10180         </oils_persist:source_definition>
10181         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10182             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10183             <field reporter:label="Session" name="session" reporter:datatype="link" />
10184             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10185             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10186         </fields>
10187         <links>
10188             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10189             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10190             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10191         </links>
10192         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10193             <actions>
10194                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10195             </actions>
10196         </permacrud>
10197     </class>
10198
10199     <class
10200         id="uvus"
10201         controller="open-ils.cstore open-ils.pcrud"
10202         oils_obj:fieldmapper="url_verify::url_selector"
10203         oils_persist:tablename="url_verify.url_selector"
10204         reporter:label="URL Verification URL Selector"
10205     >
10206         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10207             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10208             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10209                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10210             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10211         </fields>
10212
10213         <links>
10214             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10215             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10216         </links>
10217
10218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10219             <actions>
10220                 <create permission="URL_VERIFY">
10221                     <context link="session" field="owning_lib"/>
10222                 </create>
10223                 <retrieve permission="URL_VERIFY">
10224                     <context link="session" field="owning_lib"/>
10225                 </retrieve>
10226                 <update permission="URL_VERIFY">
10227                     <context link="session" field="owning_lib"/>
10228                 </update>
10229                 <delete permission="URL_VERIFY">
10230                     <context link="session" field="owning_lib"/>
10231                 </delete>
10232             </actions>
10233         </permacrud>
10234
10235     </class>
10236
10237     <class
10238         id="uvu"
10239         controller="open-ils.cstore open-ils.pcrud"
10240         oils_obj:fieldmapper="url_verify::url"
10241         oils_persist:tablename="url_verify.url"
10242         reporter:label="URL Verification URL"
10243     >
10244         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10245             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10246                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10247                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10248                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10249                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10250             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10251             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10252             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10253             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10254             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10255             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10256             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10257             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10258             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10259             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10260             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10261             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10262             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10263         </fields>
10264
10265         <links>
10266             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10267             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10268             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10269             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10270             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10271         </links>
10272
10273         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10274             <actions>
10275                 <create permission="URL_VERIFY">
10276                     <context link="session" field="owning_lib"/>
10277                 </create>
10278                 <retrieve permission="URL_VERIFY">
10279                     <context link="session" field="owning_lib"/>
10280                 </retrieve>
10281                 <update permission="URL_VERIFY">
10282                     <context link="session" field="owning_lib"/>
10283                 </update>
10284                 <delete permission="URL_VERIFY">
10285                     <context link="session" field="owning_lib"/>
10286                 </delete>
10287             </actions>
10288         </permacrud>
10289
10290     </class>
10291
10292     <class
10293         id="uvva"
10294         controller="open-ils.cstore open-ils.pcrud"
10295         oils_obj:fieldmapper="url_verify::verification_attempt"
10296         oils_persist:tablename="url_verify.verification_attempt"
10297         reporter:label="URL Verification Attempt"
10298     >
10299         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10300             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10301                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10302                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10303             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10304             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10305         </fields>
10306
10307         <links>
10308             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10309             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10310         </links>
10311
10312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10313             <actions>
10314                 <create permission="URL_VERIFY">
10315                     <context link="session" field="owning_lib"/>
10316                 </create>
10317                 <retrieve permission="URL_VERIFY">
10318                     <context link="session" field="owning_lib"/>
10319                 </retrieve>
10320                 <update permission="URL_VERIFY">
10321                     <context link="session" field="owning_lib"/>
10322                 </update>
10323                 <delete permission="URL_VERIFY">
10324                     <context link="session" field="owning_lib"/>
10325                 </delete>
10326             </actions>
10327         </permacrud>
10328
10329     </class>
10330
10331     <class
10332         id="uvuv"
10333         controller="open-ils.cstore open-ils.pcrud"
10334         oils_obj:fieldmapper="url_verify::url_verification"
10335         oils_persist:tablename="url_verify.url_verification"
10336         reporter:label="URL Verification"
10337     >
10338         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10339             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10340                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10341                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10342             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10343             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10344             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10345             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10346                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10347         </fields>
10348
10349         <links>
10350             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10351             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10352             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10353         </links>
10354
10355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10356             <actions>
10357                 <create permission="URL_VERIFY">
10358                     <context link="attempt" jump="session" field="owning_lib"/>
10359                 </create>
10360                 <retrieve permission="URL_VERIFY">
10361                     <context link="attempt" jump="session" field="owning_lib"/>
10362                 </retrieve>
10363                 <update permission="URL_VERIFY">
10364                     <context link="attempt" jump="session" field="owning_lib"/>
10365                 </update>
10366                 <delete permission="URL_VERIFY">
10367                     <context link="attempt" jump="session" field="owning_lib"/>
10368                 </delete>
10369             </actions>
10370         </permacrud>
10371
10372     </class>
10373
10374         <class
10375                 id="cfdi"
10376                 controller="open-ils.cstore open-ils.pcrud"
10377                 oils_obj:fieldmapper="config::filter_dialog_interface"
10378                 oils_persist:tablename="config.filter_dialog_interface"
10379                 reporter:label="FilterDialog Interface">
10380                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10381                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10382                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10383                 </fields>
10384                 <links>
10385                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10386                 </links>
10387                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10388                         <actions>
10389                                 <retrieve />
10390                         </actions>
10391                 </permacrud>
10392         </class>
10393
10394         <class
10395                 id="cfdfs"
10396                 controller="open-ils.cstore open-ils.pcrud"
10397                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10398                 oils_persist:tablename="config.filter_dialog_filter_set"
10399                 reporter:label="FilterDialog Filter Set">
10400                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10401                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10402                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10403                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10404                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10405                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10406                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10407                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10408                 </fields>
10409                 <links>
10410                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10411                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10412                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10413                 </links>
10414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10415                         <actions>
10416                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10417                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10418                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10419                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10420                         </actions>
10421                 </permacrud>
10422
10423         </class>
10424
10425         <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">
10426                 <fields oils_persist:primary="code">
10427                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10428                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10429                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10430                 </fields>
10431                 <links/>
10432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10433                         <actions>
10434                                 <retrieve/>
10435                         </actions>
10436                 </permacrud>
10437         </class>
10438
10439         <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">
10440                 <oils_persist:source_definition>
10441
10442             SELECT  b.id,
10443                     MAX(dcp.edit_date) AS last_delete_date
10444              FROM   biblio.record_entry b
10445                     JOIN asset.call_number cn ON (cn.record = b.id)
10446                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10447              WHERE  NOT b.deleted
10448              GROUP BY b.id
10449              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10450
10451                 </oils_persist:source_definition>
10452                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10453                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10454                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10455                 </fields>
10456                 <links>
10457                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10458                 </links>
10459                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10460                         <actions>
10461                                 <retrieve/>
10462                         </actions>
10463                 </permacrud>
10464         </class>
10465
10466         <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">
10467                 <oils_persist:source_definition>
10468
10469             -- -- 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.
10470             -- -- 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
10471             -- -- may not.
10472             -- SELECT
10473             --     bre.id AS "bib_id",
10474             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10475             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10476             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10477             -- FROM (
10478                 SELECT
10479                     y.bre AS "id",
10480                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10481                     y.hold_count AS "hold_count",
10482                     (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"
10483                 FROM (
10484                         SELECT
10485                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10486                             COUNT(*) AS "hold_count"
10487                         FROM action.hold_request h
10488                         WHERE
10489                             cancel_time IS NULL
10490                             AND fulfillment_time IS NULL
10491                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10492                         GROUP BY 1
10493                     )y LEFT JOIN (
10494                         SELECT 
10495                             (SELECT id
10496                                 FROM biblio.record_entry 
10497                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10498                             ) AS "bre", 
10499                             COUNT(*) AS "copy_count"
10500                         FROM asset.copy
10501                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10502                         WHERE copy.holdable 
10503                             AND NOT copy.deleted 
10504                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10505                         GROUP BY 1
10506                     )x ON x.bre = y.bre
10507                 -- )z RIGHT JOIN (
10508                 --     SELECT id
10509                 --     FROM biblio.record_entry
10510                 --     WHERE NOT deleted
10511                 -- )bre ON (z.bib_id = bre.id)
10512                 
10513
10514                 </oils_persist:source_definition>
10515                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10516                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10517                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10518                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10519                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10520                 </fields>
10521                 <links>
10522                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10523                 </links>
10524                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10525                         <actions>
10526                                 <retrieve/>
10527                         </actions>
10528                 </permacrud>
10529         </class>
10530
10531         <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">
10532                 <oils_persist:source_definition>
10533             SELECT *,
10534                 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,
10535                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10536             FROM
10537                 (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
10538                     FROM
10539                         action.hold_request ahr
10540                         JOIN reporter.hold_request_record rhrr USING (id)
10541                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10542                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10543                     WHERE
10544                         ahr.cancel_time IS NULL
10545                         AND ahr.fulfillment_time IS NULL
10546                     GROUP BY bib_record, pickup_lib
10547                 )x
10548                 JOIN
10549                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10550                     FROM
10551                         action.hold_request ahr
10552                         JOIN reporter.hold_request_record rhrr USING (id)
10553                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10554                     WHERE
10555                         ahr.cancel_time IS NULL
10556                         AND ahr.fulfillment_time IS NULL
10557                     GROUP BY bib_record
10558                 )y
10559                 USING (id)
10560                 </oils_persist:source_definition>
10561                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10562                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10563                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10564                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10565                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10566                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10567                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10568                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10569                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10570                 </fields>
10571                 <links>
10572                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10573                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10574                 </links>
10575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10576                         <actions>
10577                                 <retrieve/>
10578                         </actions>
10579                 </permacrud>
10580         </class>
10581
10582         <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) ">
10583                 <oils_persist:source_definition>
10584             WITH counts_at_ou AS (
10585                 SELECT bib_record, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, 
10586                     COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10587                 FROM action.hold_request ahr
10588                 JOIN reporter.hold_request_record rhrr USING (id)
10589                 LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10590                 LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10591                 WHERE ahr.cancel_time IS NULL
10592                 AND ahr.fulfillment_time IS NULL
10593                 GROUP BY bib_record, pickup_lib
10594             )
10595             SELECT *,
10596                 CASE WHEN copy_count_at_or_below = 0 THEN 'Infinity'::FLOAT ELSE holds_at_or_below::FLOAT/copy_count_at_or_below END AS hold_copy_ratio_at_or_below_ou,
10597                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10598             FROM
10599                 (SELECT bib_record AS id, aou.id AS pickup_lib_or_desc, SUM(holds_at_pickup_library) AS holds_at_or_below, SUM(copy_count_at_pickup_library) AS copy_count_at_or_below
10600                 FROM actor.org_unit aou
10601                 JOIN counts_at_ou cao ON (cao.pickup_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))) 
10602                 GROUP BY bib_record, pickup_lib_or_desc
10603                 )x
10604                 JOIN
10605                 (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10606                     FROM
10607                         action.hold_request ahr
10608                         JOIN reporter.hold_request_record rhrr USING (id)
10609                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10610                     WHERE
10611                         ahr.cancel_time IS NULL
10612                         AND ahr.fulfillment_time IS NULL
10613                     GROUP BY bib_record
10614                 )y
10615                 USING (id)
10616                 </oils_persist:source_definition>
10617                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10618                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10619                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10620                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10621                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10622                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10623                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10624                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10625                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10626                 </fields>
10627                 <links>
10628                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10629                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10630                 </links>
10631                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10632                         <actions>
10633                                 <retrieve/>
10634                         </actions>
10635                 </permacrud>
10636         </class>
10637
10638         <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">
10639                 <oils_persist:source_definition>
10640             SELECT
10641                 ac.id,
10642                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10643                 MAX(actac.xact_start) AS last_circ
10644             FROM asset.copy ac
10645                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10646             GROUP BY ac.id
10647
10648             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10649             --SELECT
10650             --    ac.id,
10651             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10652             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10653             --FROM asset.copy ac
10654             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10655             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10656             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10657                 </oils_persist:source_definition>
10658                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10659                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10660                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10661                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10662                 </fields>
10663                 <links>
10664                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10665                 </links>
10666                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10667                         <actions>
10668                                 <retrieve/>
10669                         </actions>
10670                 </permacrud>
10671         </class>
10672
10673         <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">
10674                 <fields oils_persist:primary="id">
10675                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10676                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10677                 </fields>
10678                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10679                         <actions>
10680                                 <retrieve/>
10681                         </actions>
10682                 </permacrud>
10683         </class>
10684
10685         <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">
10686                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10687                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10688                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10689                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10690                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10691                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10692                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10693                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10694                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10695                 </fields>
10696                 <links>
10697                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10698                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10699                 </links>
10700                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10701                         <actions>
10702                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10703                                 <retrieve/>
10704                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10705                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10706                         </actions>
10707                 </permacrud>
10708         </class>
10709
10710         <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">
10711                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10712                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10713                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10714                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10715                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10716                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10717                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10718                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10719                 </fields>
10720                 <links>
10721                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10722                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10723                 </links>
10724                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10725                         <actions>
10726                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10727                                 <retrieve/>
10728                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10729                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10730                         </actions>
10731                 </permacrud>
10732         </class>
10733
10734
10735         <!-- ********************************************************************************************************************* -->
10736         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10737         <!-- ********************************************************************************************************************* -->
10738         <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">
10739                 <fields oils_persist:primary="id">
10740                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10741                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10742                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10743                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10744                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10745                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10746                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10747                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10748                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10749                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10750                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10751                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10752                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10753                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10754                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10755                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10756                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10757                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10758                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10759                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10760                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10761                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10762                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10763                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10764                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10765                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10766                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10767                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10768                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10769                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10770                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10771                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10772                 </fields>
10773                 <links>
10774                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10775                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10776                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10777                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10778                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10779                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10780                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10781                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10782                 </links>
10783         </class>
10784
10785         <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">
10786                 <fields oils_persist:primary="id">
10787                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10788                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10789                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10790                 </fields>
10791                 <links>
10792                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10793                 </links>
10794         </class>
10795
10796         <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">
10797                 <fields oils_persist:primary="id">
10798                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10799                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10800                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10801                 </fields>
10802                 <links>
10803                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10804                 </links>
10805         </class>
10806
10807         <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">
10808                 <fields oils_persist:primary="id">
10809                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10810
10811                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10812                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10813                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10814
10815                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10816                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10817                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10818
10819                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10820                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10821
10822                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10823                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10824                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10825
10826                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10827                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10828
10829                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10830                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10831                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10832
10833                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10834                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10835                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10836
10837                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10838                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10839                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10840                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10841
10842                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10843                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10844
10845                 </fields>
10846                 <links>
10847                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10848                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10849                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10850                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10851                 </links>
10852         </class>
10853
10854         <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">
10855                 <oils_persist:source_definition>
10856
10857             SELECT
10858                 po.ordering_agency AS ordering_agency,
10859                 po.id AS purchase_order,
10860                 li.id AS lineitem,
10861                 lid.id AS lineitem_detail,
10862                 cpa.id AS claim_policy_action
10863             FROM
10864                 acq.lineitem_detail lid
10865                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10866                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10867                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10868                 JOIN acq.claim_policy_action cpa ON (
10869                     cpa.claim_policy = cp.id
10870
10871                     -- we only care about claim policy actions whose claim
10872                     -- interval we'd reached or exceeded
10873                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10874
10875                     -- filter out all claim policy actions where claim events
10876                     -- have occurred on or after the action's action_interval
10877                     AND NOT EXISTS (
10878                         SELECT 1
10879                         FROM
10880                             acq.claim_event evt
10881                             JOIN acq.claim claim ON (
10882                                 claim.id = evt.claim
10883                                 AND claim.lineitem_detail = lid.id
10884                             )
10885                         WHERE
10886                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10887                     )
10888                 )
10889             WHERE
10890                 lid.cancel_reason IS NULL
10891                 AND li.cancel_reason IS NULL -- belt/suspenders
10892                 AND po.cancel_reason IS NULL -- belt/suspenders
10893                 AND lid.recv_time IS NULL
10894                 AND po.state = 'on-order'
10895             ORDER BY 1, 2, 3, 4, 5
10896
10897                 </oils_persist:source_definition>
10898                 <fields>
10899                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10900                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10901                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10902                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10903                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10904                 </fields>
10905                 <links>
10906                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10907                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10908                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10909                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10910                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10911                 </links>
10912         </class>
10913         <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">
10914                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10915                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10916                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10917                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10918                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10919                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10920                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10921                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10922                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10923                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10924                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10925                 </fields>
10926                 <links>
10927                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10928                 </links>
10929     </class>
10930         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10931                 <oils_persist:source_definition>
10932             SELECT * FROM acq.lineitem_summary 
10933                                 WHERE item_count > (invoice_count + cancel_count)
10934         </oils_persist:source_definition>
10935                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10936                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10937                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10938                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10939                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10940                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10941                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10942                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10943                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10944                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10945                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10946                 </fields>
10947                 <links>
10948                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10949                 </links>
10950     </class>
10951         <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">
10952                 <oils_persist:source_definition>
10953
10954                         SELECT  t.*
10955                           FROM  action.transit_copy t
10956                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10957                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10958                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10959
10960                 </oils_persist:source_definition>
10961                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10962                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10963                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10964                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10965                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10966                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10967                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10968                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10969                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10970                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10971                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10972                 </fields>
10973                 <links>
10974                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10975                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10976                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10977                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10978                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10979                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10980                 </links>
10981         </class>
10982
10983     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10984                 <oils_persist:source_definition>
10985
10986         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10987                 SELECT
10988                         cp.id as copy,
10989                         COUNT(circ.id),
10990                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10991                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10992                 FROM
10993                         asset.copy cp
10994                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10995                 GROUP BY 1, 3, 4
10996                 UNION ALL
10997                 SELECT
10998                         cp.id as copy,
10999                         COUNT(circ.id),
11000                         EXTRACT(YEAR FROM circ.xact_start) AS year,
11001                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
11002                 FROM
11003                         asset.copy cp
11004                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11005                 GROUP BY 1, 3, 4
11006                 UNION ALL
11007                 SELECT
11008                         id as copy,
11009                         circ_count,
11010                         -1 AS year,
11011                         false as is_renewal
11012                 FROM
11013                         extend_reporter.legacy_circ_count
11014         )x GROUP BY 1, 3, 4
11015
11016                 </oils_persist:source_definition>
11017         <fields>
11018             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11019             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11020             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11021             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11022         </fields>
11023                 <links>
11024                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11025                 </links>
11026                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11027                         <actions>
11028                                 <retrieve/>
11029                         </actions>
11030                 </permacrud>
11031     </class>
11032
11033         <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">
11034                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11035                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11036                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11037                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11038                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11039                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11040                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11041                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11042                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11043                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11044                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11045                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11046                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11047                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11048                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11049                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11050                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11051                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11052                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11053                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11054                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11055                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11056                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11057                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11058                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11059                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11060                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11061                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11062                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11063                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11064                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11065                 </fields>
11066                 <links>
11067                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11068                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11069                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11070                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11071                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11072                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11073                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11074                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11075                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11076                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11077                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11078                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11079                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11080                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11081                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11082                 </links>
11083         </class>
11084
11085     <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">
11086         <fields oils_persist:primary="id">
11087             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11088             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11089             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11090             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11091             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11092             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11093             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11094             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11095             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11096             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11097             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11098             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11099             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11100             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11101             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11102             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11103             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11104             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11105             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11106             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11107             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11108             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11109             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11110             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11111             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11112             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11113             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11114             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11115             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11116             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11117             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11118             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11119             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11120             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11121         </fields>
11122         <links>
11123             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11124             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11125             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11126             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11127             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11128             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11129             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11130             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11131         </links>
11132     </class>
11133
11134     <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">
11135         <fields oils_persist:primary="id">
11136             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11137             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11138             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11139             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11140         </fields>
11141         <links>
11142             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11143             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11144         </links>
11145     </class>
11146
11147     <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">
11148         <fields oils_persist:primary="owning_lib">
11149             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11150             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11151             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11152         </fields>
11153         <links>
11154             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11155         </links>
11156     </class>
11157
11158     <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">
11159         <fields oils_persist:primary="id">
11160             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11161             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11162             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11163             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11164             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11165         </fields>
11166         <links>
11167             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11168             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11169             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11170         </links>
11171     </class>
11172
11173     <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">
11174         <fields oils_persist:primary="circ_lib">
11175             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11176             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11177             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11178             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11179         </fields>
11180         <links>
11181             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11182             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11183         </links>
11184     </class>
11185
11186     <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">
11187         <fields oils_persist:primary="id">
11188             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11189             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11190             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11191             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11192             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11193         </fields>
11194         <links>
11195             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11196             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11197             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11198         </links>
11199     </class>
11200
11201     <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">
11202         <fields oils_persist:primary="home_ou">
11203             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11204             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11205             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11206             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11207         </fields>
11208         <links>
11209             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11210             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11211         </links>
11212     </class>
11213         <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">
11214                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11215                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11216                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11217                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11218                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11219                 </fields>
11220                 <links>
11221                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11222                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11223                 </links>
11224                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11225                         <actions>
11226                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11227                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11228                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11229                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11230                         </actions>
11231                 </permacrud>
11232         </class>
11233         <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">
11234                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11235                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11236                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11237                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11238                 </fields>
11239                 <links>
11240                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11241                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11242                         </links>
11243                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11244                 <actions>
11245                                 <create permission="ADMIN_ACQ_FUND_TAG">
11246                                         <context link="tag" field="owner"/>
11247                                 </create>
11248                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11249                                         <context link="tag" field="owner"/>
11250                                 </retrieve>
11251                                 <update permission="ADMIN_ACQ_FUND_TAG">
11252                                         <context link="tag" field="owner"/>
11253                                 </update>
11254                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11255                                         <context link="tag" field="owner"/>
11256                                 </delete>
11257                         </actions>
11258                 </permacrud>
11259         </class>
11260         <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">
11261                 <oils_persist:source_definition><![CDATA[
11262                 SELECT
11263                         poi.purchase_order AS purchase_order,
11264                         ii.invoice AS invoice,
11265                         NULL AS lineitem,
11266                         poi.id AS po_item,
11267                         NULL AS picklist
11268                 FROM
11269                         acq.po_item poi
11270                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11271                 UNION SELECT
11272                         jub.purchase_order AS purchase_order,
11273                         ie.invoice AS invoice,
11274                         jub.id AS lineitem,
11275                         NULL AS po_item,
11276                         jub.picklist AS picklist
11277                 FROM
11278                         acq.lineitem jub
11279                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11280                 UNION SELECT
11281                         ii.purchase_order AS purchase_order,
11282                         ii.invoice AS invoice,
11283                         NULL AS lineitem,
11284                         NULL AS po_item,
11285                         NULL AS picklist
11286                 FROM
11287                         acq.invoice_item ii
11288                 WHERE ii.po_item IS NULL
11289                 UNION SELECT
11290                         ie.purchase_order AS purchase_order,
11291                         ie.invoice AS invoice,
11292                         NULL AS lineitem,
11293                         NULL AS po_item,
11294                         NULL AS picklist
11295                 FROM
11296                         acq.invoice_entry ie
11297                 WHERE ie.lineitem IS NULL
11298                 UNION SELECT
11299                         NULL AS purchase_order,
11300                         NULL AS invoice,
11301                         jub.id AS lineitem,
11302                         NULL AS po_item,
11303                         jub.picklist AS picklist
11304                 FROM
11305                         acq.lineitem jub
11306                 WHERE jub.purchase_order IS NULL
11307                 ]]></oils_persist:source_definition>
11308                 <fields>
11309                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11310                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11311                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11312                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11313                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11314                 </fields>
11315                 <links>
11316                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11317                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11318                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11319                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11320                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11321                 </links>
11322         </class>
11323         <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">
11324                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11325                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11326                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11327                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11328                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11329                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11330                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11331                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11332                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11333                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11334                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11335                 </fields>
11336                 <links>
11337                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11338                 </links>
11339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11340                         <actions>
11341                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11342                                 <retrieve/>
11343                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11344                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11345                         </actions>
11346                 </permacrud>
11347         </class>
11348
11349         <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">
11350                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11351                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11352                         <field name="date_applied" reporter:datatype="timestamp"/>
11353                         <field name="org" reporter:datatype="org_unit"/>
11354                         <field name="original_value" reporter:datatype="text"/>
11355                         <field name="new_value" reporter:datatype="text"/>
11356                         <field name="field_name" reporter:datatype="link"/>
11357                 </fields>
11358                 <links>
11359                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11360                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11361                 </links>
11362                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11363                         <actions>
11364                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11365                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11366                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11367                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11368                         </actions>
11369                 </permacrud>
11370         </class>
11371         <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">
11372                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11373                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11374                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11375                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11376                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11377                 </fields>
11378                 <links>
11379                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11380                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11381                 </links>
11382         </class>
11383         <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">
11384                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11385                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11386                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11387                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11388                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11389                 </fields>
11390                 <links>
11391                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11392                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11393                 </links>
11394         </class>
11395         <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">
11396                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11397                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11398                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11399                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11400                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11401                 </fields>
11402                 <links>
11403                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11404                 </links>
11405                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11406                         <actions>
11407                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11408                                 <retrieve/>
11409                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11410                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11411                         </actions>
11412                 </permacrud>
11413         </class>
11414         <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">
11415                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11416                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11417                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11418                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11419                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11420                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11421                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11422                 </fields>
11423                 <links>
11424                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11425                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11426                 </links>
11427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11428                         <actions>
11429                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11430                                 <retrieve/>
11431                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11432                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11433                         </actions>
11434                 </permacrud>
11435         </class>
11436         <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">
11437         <oils_persist:source_definition>
11438         SELECT ahcm.target_copy AS "id",count(*) AS "count"
11439          FROM
11440          action.hold_request ahr,
11441          action.hold_copy_map ahcm
11442          WHERE
11443          ahr.cancel_time IS NULL AND
11444          ahr.fulfillment_time IS NULL AND
11445          ahr.capture_time IS NULL AND
11446          ahr.id = ahcm.hold
11447          GROUP BY ahcm.target_copy
11448         </oils_persist:source_definition>
11449         <fields oils_persist:primary="id">
11450             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11451             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11452         </fields>
11453         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11454             <actions>
11455                <retrieve/>
11456             </actions>
11457         </permacrud>
11458         </class>
11459
11460         <!-- ********************************************************************************************************************* -->
11461
11462 </IDL>
11463
11464 <!--
11465     vim:noet:ts=4:sw=4:
11466 -->