]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1447746: Do not update bib source on match-only merge
[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="source" 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                 </fields>
2990                 <links>
2991                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2992                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2993                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2994                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2995                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2996                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2997                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2998                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2999                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3000                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3001                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3002                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3003                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3004                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3005                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3006                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3007                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3008                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3009                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3010                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3011                 </links>
3012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3013             <actions>
3014                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3015                 <retrieve/>
3016                 <update permission="UPDATE_MARC" global_required="true"/>
3017                 <!-- 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. -->
3018                 <delete permission="DELETE_RECORD" global_required="true"/>
3019             </actions>
3020         </permacrud>
3021         </class>
3022         <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">
3023                 <fields oils_persist:primary="id">
3024                         <field name="dow_0_close" />
3025                         <field name="dow_0_open" />
3026                         <field name="dow_1_close" />
3027                         <field name="dow_1_open" />
3028                         <field name="dow_2_close" />
3029                         <field name="dow_2_open" />
3030                         <field name="dow_3_close" />
3031                         <field name="dow_3_open" />
3032                         <field name="dow_4_close" />
3033                         <field name="dow_4_open" />
3034                         <field name="dow_5_close" />
3035                         <field name="dow_5_open" />
3036                         <field name="dow_6_close" />
3037                         <field name="dow_6_open" />
3038                         <field name="id" reporter:datatype="id" />
3039                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3040                 </fields>
3041                 <links>
3042                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3043                 </links>
3044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3045             <actions>
3046                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3047                 <retrieve/>
3048                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3049                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3050             </actions>
3051         </permacrud>
3052         </class>
3053         <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">
3054                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3055                         <field name="id" reporter:datatype="id" />
3056                         <field name="record" reporter:datatype="link"/>
3057                         <field name="label" reporter:datatype="text"/>
3058                         <field name="label_sortkey" reporter:datatype="text"/>
3059                         <field name="deleted" reporter:datatype="bool"/>
3060                 </fields>
3061                 <links>
3062                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3063                 </links>
3064         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3065             <actions>
3066                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3067                 <retrieve/>
3068                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3069                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3070             </actions>
3071         </permacrud>
3072         </class>
3073         <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">
3074                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3075                         <field name="id" reporter:datatype="id" />
3076                         <field name="target_copy" reporter:datatype="link" />
3077                         <field name="part" reporter:datatype="link"/>
3078                 </fields>
3079                 <links>
3080                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3081                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3082                 </links>
3083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3084             <actions>
3085                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3086                 <retrieve/>
3087                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3088                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3089             </actions>
3090         </permacrud>
3091         </class>
3092         <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">
3093                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3094                         <field name="close_end" reporter:datatype="timestamp" />
3095                         <field name="close_start" reporter:datatype="timestamp" />
3096                         <field name="id" reporter:datatype="id" />
3097                         <field name="org_unit" reporter:datatype="org_unit"/>
3098                         <field name="reason" reporter:datatype="text"/>
3099                 </fields>
3100                 <links>
3101                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3102                 </links>
3103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3104             <actions>
3105                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3106                 <retrieve/>
3107                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3108                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3109             </actions>
3110         </permacrud>
3111         </class>
3112         <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">
3113                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3114                         <field name="extended" reporter:datatype="interval"/>
3115                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3116                         <field name="max_renewals" reporter:datatype="int" />
3117                         <field name="name" reporter:datatype="text"/>
3118                         <field name="normal" reporter:datatype="interval"/>
3119                         <field name="shrt" reporter:datatype="interval"/>
3120                 </fields>
3121                 <links>
3122                 </links>
3123         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3124             <actions>
3125                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3126                 <retrieve/>
3127                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3128                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3129             </actions>
3130         </permacrud>
3131         </class>
3132
3133         <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">
3134                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3135                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3136                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3137             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3138                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3139             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3140                 </fields>
3141                 <links>
3142             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3143                 </links>
3144                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3145             <actions>
3146                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3147                 <retrieve/>
3148                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3149                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3150             </actions>
3151                 </permacrud>
3152         </class>
3153
3154         <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">
3155                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3156                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3157                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3158                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3159             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3160                 </fields>
3161                 <links>
3162                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3163                 </links>
3164                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3165             <actions>
3166                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3167                 <retrieve/>
3168                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3169                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3170             </actions>
3171                 </permacrud>
3172         </class>
3173
3174         <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">
3175                 <fields oils_persist:primary="id" oils_persist:sequence="">
3176                         <field name="balance_owed" reporter:datatype="money"/>
3177                         <field name="id" reporter:datatype="id" />
3178                         <field name="last_billing_note" reporter:datatype="text"/>
3179                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3180                         <field name="last_billing_type" reporter:datatype="text"/>
3181                         <field name="last_payment_note" reporter:datatype="text"/>
3182                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3183                         <field name="last_payment_type" reporter:datatype="text"/>
3184                         <field name="total_owed" reporter:datatype="money"/>
3185                         <field name="total_paid" reporter:datatype="money"/>
3186                         <field name="usr" reporter:datatype="link"/>
3187                         <field name="xact_finish" reporter:datatype="timestamp" />
3188                         <field name="xact_start" reporter:datatype="timestamp" />
3189                         <field name="xact_type" reporter:datatype="text"/>
3190                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3191                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3192                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3194                         <field name="billing_location" reporter:datatype="link"/>
3195                 </fields>
3196                 <links>
3197                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3198                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3199                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3200                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3201                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3202                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3203                 </links>
3204                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3205                         <actions>
3206                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3207                                         <context link="usr" field="home_ou" />
3208                                 </retrieve>
3209                         </actions>
3210                 </permacrud>
3211         </class>
3212         <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">
3213                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3214                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3219                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3220                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3221                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3222                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3223                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3224                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3225                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3226                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3227                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3228                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3229                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3230                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3231                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3232                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3233                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3234                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3235                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3236                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3237                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3238                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3239                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3240                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3241                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3242                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3243                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3244                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3245                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3246                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3247                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3248                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3249                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3250                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3251                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3252                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3253                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3254                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3255                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3256                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3257                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3258                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3259                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3260                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3261                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3262                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3263                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3264                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3265                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3266                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3267                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3268                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3269                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3272                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3274                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3275                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3276                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3277                 </fields>
3278                 <links>
3279                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3280                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3281                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3282                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3283                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3284                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3285                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3286                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3287                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3288                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3289                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3290                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3291                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3292                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3293                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3294                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3295                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3296                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3297                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3298                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3299                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3300                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3301                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3302                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3303                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3304                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3305                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3306                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3307                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3308                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3309                 </links>
3310                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3311                         <actions>
3312                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3313                         </actions>
3314                 </permacrud>
3315         </class>
3316         <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">
3317                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3318                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3319                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3320                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3321                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3322                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3323                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3324                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3325                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3326         </fields>
3327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3328                         <actions>
3329                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3330                                 <retrieve/>
3331                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3332                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3333                         </actions>
3334                 </permacrud>
3335         </class>
3336         <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">
3337                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3338                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3339                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3340                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3341                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3342         </fields>
3343         <links>
3344                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3345                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3346                 </links>
3347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3348                         <actions>
3349                                 <retrieve permission="RUN_REPORTS">
3350                                         <context link="usr" field="home_ou" />
3351                                 </retrieve>
3352                         </actions>
3353                 </permacrud>
3354         </class>
3355         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3356                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3357                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3358                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3359                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3360                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3361                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3362                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3363         </fields>
3364         <links>
3365                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3366                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3367                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3368                 </links>
3369                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3370                         <actions>
3371                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3372                                         <context link="usr" field="home_ou" />
3373                                         <context link="ws" field="owning_lib" />
3374                                 </retrieve>
3375                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3376                                         <context link="usr" field="home_ou" />
3377                                         <context link="ws" field="owning_lib" />
3378                                 </create>
3379                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3380                                         <context link="usr" field="home_ou" />
3381                                         <context link="ws" field="owning_lib" />
3382                                 </update>
3383                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3384                                         <context link="usr" field="home_ou" />
3385                                         <context link="ws" field="owning_lib" />
3386                                 </delete>
3387                         </actions>
3388                 </permacrud>
3389         </class>
3390         <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">
3391                 <fields oils_persist:primary="name">
3392                         <field name="name" reporter:datatype="text"/>
3393                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3394                 </fields>
3395                 <links/>
3396                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3397                         <actions>
3398                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3399                                 <retrieve/>
3400                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3401                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3402                         </actions>
3403                 </permacrud>
3404         </class>
3405         <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">
3406                 <fields oils_persist:primary="name">
3407                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3408                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3409                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3410                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3411                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3412                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3413                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3414                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3415                 </fields>
3416                 <links>
3417                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3418                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3419                 </links>
3420                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3421                         <actions>
3422                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3423                                 <retrieve/>
3424                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3425                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3426                         </actions>
3427                 </permacrud>
3428         </class>
3429         <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">
3430                 <fields oils_persist:primary="name">
3431                         <field name="name" reporter:datatype="text"/>
3432                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3433                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3434                         <field name="datatype" reporter:datatype="text"/>
3435                         <field name="view_perm" reporter:datatype="link"/>
3436                         <field name="update_perm" reporter:datatype="link"/>
3437                         <field name="fm_class" reporter:datatype="text"/>
3438                         <field name="grp" reporter:datatype="link"/>
3439                 </fields>
3440                 <links>
3441                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3442                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3443                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3444                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3445                 </links>
3446                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3447                         <actions>
3448                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3449                                 <retrieve/>
3450                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3451                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3452                         </actions>
3453                 </permacrud>
3454         </class>
3455         <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">
3456                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3457                         <field name="id" />
3458                         <field name="name"  reporter:datatype="text"/>
3459                         <field name="org_unit" reporter:datatype="org_unit"/>
3460                         <field name="value"  reporter:datatype="text"/>
3461                 </fields>
3462                 <links>
3463                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3464                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3465                 </links>
3466         </class>
3467         <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">
3468                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3469                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3470                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3471                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3472                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3473                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3474                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3475                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3476                 </fields>
3477                 <links>
3478                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3479                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3480                 </links>
3481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3482             <actions>
3483                 <create permission="CREATE_COPY_NOTE">
3484                     <context link="owning_copy" field="circ_lib"/>
3485                 </create>
3486                 <retrieve permission="VIEW_COPY_NOTES">
3487                     <context link="owning_copy" field="circ_lib"/>
3488                 </retrieve>
3489                 <update permission="UPDATE_COPY_NOTE">
3490                     <context link="owning_copy" field="circ_lib"/>
3491                 </update>
3492                 <delete permission="DELETE_COPY_NOTE">
3493                     <context link="owning_copy" field="circ_lib"/>
3494                 </delete>
3495             </actions>
3496         </permacrud>
3497         </class>
3498         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3499                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3500                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3501                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3502                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3503                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3504                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3505                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3506                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3507                 </fields>
3508                 <links>
3509                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3510                 </links>
3511         </class>
3512         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3513                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3514                         <field name="fingerprint"  reporter:datatype="text"/>
3515                         <field name="id" reporter:datatype="id" />
3516                         <field name="master_record" reporter:datatype="link"/>
3517                         <field name="mods"  reporter:datatype="text"/>
3518                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3519                 </fields>
3520                 <links>
3521                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3522                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3523                 </links>
3524         </class>
3525         <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">
3526                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3527                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3528                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3529                 </fields>
3530                 <links/>
3531         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3532             <actions>
3533                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3534                 <retrieve/>
3535                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3536                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3537             </actions>
3538         </permacrud>
3539         </class>
3540         <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">
3541                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3542                         <field name="code"  reporter:datatype="text"/>
3543                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3544                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3545                 </fields>
3546                 <links/>
3547         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3548             <actions>
3549                 <create permission="CREATE_PERM" global_required="true"/>
3550                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3551                 <update permission="UPDATE_PERM" global_required="true"/>
3552                 <delete permission="DELETE_PERM" global_required="true"/>
3553             </actions>
3554         </permacrud>
3555         </class>
3556         <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">
3557                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3558                         <field name="id" reporter:datatype="id" />
3559                         <field name="metarecord" reporter:datatype="link"/>
3560                         <field name="source" reporter:datatype="link"/>
3561                 </fields>
3562                 <links>
3563                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3564                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3565                 </links>
3566         </class>
3567         <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">
3568                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3569                         <field name="id" reporter:datatype="id" />
3570                         <field name="field" reporter:datatype="link"/>
3571                         <field name="source" reporter:datatype="link"/>
3572                         <field name="value"  reporter:datatype="text"/>
3573                 </fields>
3574                 <links>
3575                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3576                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3577                 </links>
3578         </class>
3579         <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">
3580                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3581                         <field name="id" reporter:datatype="id" />
3582                         <field name="value" reporter:datatype="text"/>
3583                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3584                 </fields>
3585                 <links>
3586                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3587                 </links>
3588         </class>
3589         <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">
3590                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3591                         <field name="id" reporter:datatype="id" />
3592                         <field name="entry" reporter:datatype="link"/>
3593                         <field name="def" reporter:datatype="link"/>
3594                         <field name="source" reporter:datatype="link"/>
3595                 </fields>
3596                 <links>
3597                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3598                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3599                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3600                 </links>
3601         </class>
3602         <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">
3603                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3604                         <field name="id" reporter:datatype="id" />
3605                         <field name="entry" reporter:datatype="link"/>
3606                         <field name="simple_heading" reporter:datatype="link"/>
3607                 </fields>
3608                 <links>
3609                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3610                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3611                 </links>
3612         </class>
3613         <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">
3614                 <oils_persist:source_definition>
3615                         SELECT * FROM metabib.author_field_entry
3616                                                 UNION ALL
3617                         SELECT * FROM metabib.keyword_field_entry
3618                                                 UNION ALL
3619                         SELECT * FROM metabib.identifier_field_entry
3620                                                 UNION ALL
3621                         SELECT * FROM metabib.title_field_entry
3622                                                 UNION ALL
3623                         SELECT * FROM metabib.subject_field_entry
3624                                                 UNION ALL
3625                         SELECT * FROM metabib.series_field_entry
3626                 </oils_persist:source_definition>
3627                 <fields>
3628                         <field name="field" reporter:datatype="link"/>
3629                         <field name="id" reporter:datatype="id" />
3630                         <field name="source" reporter:datatype="link"/>
3631                         <field name="value"  reporter:datatype="text"/>
3632                 </fields>
3633                 <links>
3634                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3635                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3636                 </links>
3637         </class>
3638         <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">
3639                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3640                         <field name="field" reporter:datatype="link"/>
3641                         <field name="id" reporter:datatype="id" />
3642                         <field name="source" reporter:datatype="link"/>
3643                         <field name="value"  reporter:datatype="text"/>
3644                 </fields>
3645                 <links>
3646                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3647                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3648                 </links>
3649         </class>
3650         <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">
3651                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3652                         <field name="accepting_usr" reporter:datatype="link"/>
3653                         <field name="amount" reporter:datatype="money" />
3654                         <field name="amount_collected" reporter:datatype="money" />
3655                         <field name="cash_drawer" reporter:datatype="link"/>
3656                         <field name="id" reporter:datatype="id" />
3657                         <field name="note"  reporter:datatype="text"/>
3658                         <field name="payment_ts" reporter:datatype="timestamp"/>
3659                         <field name="xact" reporter:datatype="link"/>
3660                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3661                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3662                 </fields>
3663                 <links>
3664                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3665                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3666                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3667                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3668                 </links>
3669         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3670             <actions>
3671                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3672                     <context link="xact" jump="usr" field="home_ou"/>
3673                 </retrieve>
3674                         </actions>
3675                 </permacrud>
3676         </class>
3677         <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">
3678                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3679                         <field name="accepting_usr" reporter:datatype="link"/>
3680                         <field name="amount" reporter:datatype="money" />
3681                         <field name="amount_collected" reporter:datatype="money" />
3682                         <field name="id" reporter:datatype="id" />
3683                         <field name="note"  reporter:datatype="text"/>
3684                         <field name="payment_ts" reporter:datatype="timestamp"/>
3685                         <field name="xact" reporter:datatype="link"/>
3686                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3687                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3688                 </fields>
3689                 <links>
3690                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3691                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3692                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3693                 </links>
3694         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3695             <actions>
3696                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3697                     <context link="xact" jump="usr" field="home_ou"/>
3698                 </retrieve>
3699                         </actions>
3700                 </permacrud>
3701         </class>
3702         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3703                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3704                         <field name="accepting_usr" reporter:datatype="link"/>
3705                         <field name="amount" reporter:datatype="money" />
3706                         <field name="amount_collected" reporter:datatype="money" />
3707                         <field name="id" reporter:datatype="id" />
3708                         <field name="note"  reporter:datatype="text"/>
3709                         <field name="payment_ts" reporter:datatype="timestamp"/>
3710                         <field name="xact" reporter:datatype="link"/>
3711                         <field name="billing" reporter:datatype="link"/>
3712                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3713                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3714                 </fields>
3715                 <links>
3716                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3717                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3718                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3719                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3720                 </links>
3721         </class>
3722         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3723                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3724                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3725                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3726                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3727                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3728                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3729                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3730                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3731                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3732                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3733                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3734                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3735                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3736                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3737                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3738                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3739                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3740                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3741                 </fields>
3742                 <links>
3743                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3744                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3745                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3746                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3747                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3748                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3749                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3750                 </links>
3751         </class>
3752
3753         <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">
3754                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3755                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3756                         <field name="name"  reporter:datatype="text"/>
3757                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3758                         <field name="block_list" reporter:datatype="text"/>
3759                         <field name="staff_alert" reporter:datatype="bool"/>
3760                         <field name="org_depth" reporter:datatype="int"/>
3761                         <field name="ignore_proximity" reporter:datatype="int"/>
3762                 </fields>
3763                 <links/>
3764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3765             <actions>
3766                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3767                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3768                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3769                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3770             </actions>
3771         </permacrud>
3772         </class>
3773         <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">
3774                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3775                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3776                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3777                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3778                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3779                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3780                 </fields>
3781                 <links>
3782                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3783                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3784                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3785         </links>
3786         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3787             <actions>
3788                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3789                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3790                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3791                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3792             </actions>
3793         </permacrud>
3794         </class>
3795         <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">
3796                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3797                         <field name="holdable" reporter:datatype="bool"/>
3798                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3799                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3800                         <field name="opac_visible" reporter:datatype="bool"/>
3801             <field name="copy_active" reporter:datatype="bool"/>
3802             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3803                 </fields>
3804                 <links/>
3805         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3806             <actions>
3807                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3808                 <retrieve/>
3809                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3810                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3811             </actions>
3812         </permacrud>
3813         </class>
3814         <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">
3815                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3816                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3817                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3818                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3819                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3820                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3821                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3822                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3823                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3824                 </fields>
3825                 <links>
3826                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3827                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3828                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3829                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3830                 </links>
3831                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3832                         <actions>
3833                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3834                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3835                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3836                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3837                         </actions>
3838                 </permacrud>
3839         </class>
3840         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3842                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3843                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3844                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3845                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3846                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3847                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3848                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3849                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3850                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3851                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3852                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3853                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3854                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3855                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3856                 </fields>
3857                 <links>
3858                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3859                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3860                 </links>
3861         </class>
3862         <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">
3863                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3864                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3865                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3866                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3867                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3868                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3869                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3870                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3871                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3872                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3873                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3874                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3875                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3876                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3877                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3878                 </fields>
3879                 <links>
3880                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3881                 </links>
3882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3883                         <actions>
3884                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3885                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3886                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3887                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3888                         </actions>
3889                 </permacrud>
3890         </class>
3891
3892
3893         <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">
3894                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3896                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3897                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3898                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3899                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3900                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3901                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3902                 </fields>
3903                 <links>
3904                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3905                 </links>
3906         </class>
3907
3908         <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">
3909                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3910                         <field name="call_number" />
3911                         <field name="create_date" reporter:datatype="timestamp"/>
3912                         <field name="creator" reporter:datatype="link"/>
3913                         <field name="id" reporter:datatype="id" />
3914                         <field name="pub" reporter:datatype="bool"/>
3915                         <field name="title"  reporter:datatype="text"/>
3916                         <field name="value"  reporter:datatype="text"/>
3917                 </fields>
3918                 <links>
3919                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3920                 </links>
3921         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3922             <actions>
3923                 <create permission="CREATE_VOLUME_NOTE">
3924                     <context link="call_number" field="owning_lib"/>
3925                 </create>
3926                 <retrieve permission="VIEW_VOLUME_NOTES">
3927                     <context link="call_number" field="owning_lib"/>
3928                 </retrieve>
3929                 <update permission="UPDATE_VOLUME_NOTE">
3930                     <context link="call_number" field="owning_lib"/>
3931                 </update>
3932                 <delete permission="DELETE_VOLUME_NOTE">
3933                     <context link="call_number" field="owning_lib"/>
3934                 </delete>
3935             </actions>
3936         </permacrud>
3937         </class>
3938         <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">
3939                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3940                         <field name="create_date" reporter:datatype="timestamp"/>
3941                         <field name="creator" reporter:datatype="link"/>
3942                         <field name="edit_date" reporter:datatype="timestamp"/>
3943                         <field name="editor" reporter:datatype="link"/>
3944                         <field name="id" reporter:datatype="id" />
3945                         <field name="record" reporter:datatype="link"/>
3946                         <field name="value" reporter:datatype="text"/>
3947                 </fields>
3948                 <links>
3949                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3950                 </links>
3951         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3952             <actions>
3953                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3954                 <retrieve/>
3955                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3956                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3957             </actions>
3958         </permacrud>
3959         </class>
3960         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3961         <oils_persist:source_definition>
3962 SELECT  usr,
3963         SUM(
3964             CASE
3965                 WHEN (
3966                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3967                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3968                 ) THEN 1
3969                 ELSE 0
3970             END
3971         ) AS out,
3972
3973         SUM(
3974             CASE
3975                 WHEN (
3976                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3977                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3978                 ) THEN 1
3979                 ELSE 0
3980             END
3981         ) AS overdue,
3982
3983         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3984         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3985         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3986   FROM  action.circulation
3987   WHERE checkin_time IS NULL
3988   GROUP BY 1
3989         </oils_persist:source_definition>
3990         <fields oils_persist:primary="usr">
3991             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3992             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3993             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3994             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3995             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3996             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3997         </fields>
3998         <links>
3999             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4000         </links>
4001         </class>
4002         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4003         <oils_persist:source_definition>
4004 SELECT  usr,
4005         STRING_AGG(
4006             CASE
4007                 WHEN (
4008                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4009                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4010                 ) THEN id::TEXT
4011                 ELSE '0'
4012             END
4013         ,',') AS out,
4014
4015         STRING_AGG(
4016             CASE
4017                 WHEN (
4018                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4019                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4020                 ) THEN id::TEXT
4021                 ELSE '0'
4022             END
4023         ,',') AS overdue,
4024
4025         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4026         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4027         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4028   FROM  action.circulation
4029   WHERE checkin_time IS NULL
4030   GROUP BY 1
4031         </oils_persist:source_definition>
4032         <fields oils_persist:primary="usr">
4033             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4034             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4035             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4036             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4037             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4038             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4039         </fields>
4040         <links>
4041             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4042         </links>
4043         </class>
4044         <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">
4045                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4046                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4047                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4048                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4049                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4050                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4051                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4052                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4053                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4054                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4055                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4056                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4057                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4058                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4059                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4060                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4061                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4062                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4063                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4064                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4065                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4066                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4067                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4068                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4069                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4070                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4071                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4072                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4073                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4074                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4075                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4076                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4077                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4078                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4079                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4080                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4081                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4082                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4083                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4084                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4085                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4086                 </fields>
4087                 <links>
4088                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4089                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4090                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4091                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4092                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4093                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4094                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4095                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4096                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4097                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4098                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4099                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4100                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4101                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4102                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4103                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4104                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4105                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4106                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4107                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4108                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4109                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4110                 </links>
4111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4112                         <actions>
4113                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4114                         </actions>
4115                 </permacrud>
4116         </class>
4117         <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">
4118                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4119                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4120                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4121                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4122                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4123                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4124                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4125                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4126                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4127                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4128                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4129                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4130                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4131                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4132                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4133                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4134                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4135                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4136                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4137                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4138                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4139                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4140                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4141                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4142                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4143                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4144                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4145                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4146                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4147                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4148                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4149                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4150                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4151                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4152                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4153                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4154                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4155                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4156                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4157                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4158                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4159                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4160                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4161                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4162                 </fields>
4163                 <links>
4164                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4165                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4166                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4167                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4168                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4169                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4170                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4171                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4172                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4173                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4174                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4175                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4176                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4177                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4178                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4179                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4180                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4181                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4182                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4183                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4184                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4185                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4186                 </links>
4187         </class>
4188         <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">
4189                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4190                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4191                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4192                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4193                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4194                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4195                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4196                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4197                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4198                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4199                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4200                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4201                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4202                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4203                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4204                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4205                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4206                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4207                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4208                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4209                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4210                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4211                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4212                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4213                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4214                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4215                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4216                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4217                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4218                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4219                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4220                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4221                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4222                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4223                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4224                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4225                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4226                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4227                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4228                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4229                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4230                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4231                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4232                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4233                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4234                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4235                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4236                 </fields>
4237                 <links>
4238                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4239                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4240                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4241                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4242                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4243                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4244                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4245                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4246                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4247                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4248                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4249                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4250                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4251                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4252                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4253                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4254                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4255                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4256                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4257                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4258                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4259                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4260                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4261                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4262                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4263                 </links>
4264         </class>
4265         <class id="auch" 
4266                 controller="open-ils.cstore" 
4267                 oils_obj:fieldmapper="action::user_circ_history" 
4268                 oils_persist:tablename="action.usr_circ_history" 
4269                 reporter:label="User Checkout History">
4270                 <fields oils_persist:primary="id" oils_persist:sequence="action.usr_circ_history_id_seq">
4271                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4272                         <!-- prevent reporting on the user that owns the checkout history -->
4273                         <field reporter:label="User" name="usr" reporter:datatype="link" suppress_controller="open-ils.reporter-store"/>
4274                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4275                         <field reporter:label="Checkin Time" name="checkin_time" reporter:datatype="timestamp" />
4276                         <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp" />
4277                         <field reporter:label="Checkout Time" name="xact_start" reporter:datatype="timestamp" />
4278                         <field reporter:label="Source Circulation" name="source_circ" reporter:datatype="link" />
4279                 </fields>
4280                 <links>
4281                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4282                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4283                         <link field="source_circ" reltype="has_a" key="id" map="" class="circ"/>
4284                 </links>
4285         </class>
4286         <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">
4287                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4288                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4289                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4290                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4291                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4292                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4293                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4294                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4295                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4296                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4297                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4298                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4299                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4300                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4301                 </fields>
4302                 <links>
4303                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4304                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4305                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4306                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4307                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4308                 </links>
4309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4310                         <actions>
4311                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4312                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4313                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4314                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4315                         </actions>
4316                 </permacrud>
4317         </class>
4318
4319         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4320                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4321                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4322                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4323                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4324                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4325                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4326                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4327                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4328                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4329                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4330                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4331                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4332                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4333                 </fields>
4334                 <links>
4335                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4336                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4337                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4338                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4339                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4340                 </links>
4341                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4342                         <actions>
4343                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4344                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4345                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4346                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4347                         </actions>
4348                 </permacrud>
4349         </class>
4350         
4351         <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">
4352                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4353                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4354                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4355                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4356                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4357                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4358                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4359                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4360                 </fields>
4361                 <links>
4362                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4363                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4364                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4365                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4366                 </links>
4367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4368                         <actions>
4369                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4370                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4371                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4372                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4373                         </actions>
4374                 </permacrud>
4375         </class>
4376         
4377         <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">
4378                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4379                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4380                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4381                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4382                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4383                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4384                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4385                 </fields>
4386                 <links>
4387                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4388                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4389                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4390                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4391                 </links>
4392                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4393                         <actions>
4394                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4395                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4396                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4397                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4398                         </actions>
4399                 </permacrud>
4400         </class>
4401         
4402         <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">
4403                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4404                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4405                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4406                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4407                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4408                 </fields>
4409                 <links>
4410                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4411                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4412                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4413                 </links>
4414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4415                         <actions>
4416                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4417                     <context link="resource" field="owner" />
4418                 </create>
4419                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4420                     <context link="resource" field="owner" />
4421                 </retrieve>
4422                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4423                     <context link="resource" field="owner" />
4424                 </update>
4425                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4426                     <context link="resource" field="owner" />
4427                 </delete>
4428                         </actions>
4429                 </permacrud>
4430         </class>
4431         
4432         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4433                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4434                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4435                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4436                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4437                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4438                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4439                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4440                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4441                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4442                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4443                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4444                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4445                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4446                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4447                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4448                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4449                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4450                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4451                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4452                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4453                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4454                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4455                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4456                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4457                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4458                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4459                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4460                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4461                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4462                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4463                 </fields>
4464                 <links>
4465                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4466                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4467                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4468                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4469                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4470                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4471                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4472                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4473                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4474                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4475                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4476                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4477                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4478                 </links>
4479                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4480                         <actions>
4481                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4482                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4483                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4484                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4485                         </actions>
4486                 </permacrud>
4487         </class>
4488         
4489         <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">
4490                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4491                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4492                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4493                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4494                 </fields>
4495                 <links>
4496                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4497                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4498                 </links>
4499                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4500                         <actions>
4501                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4502                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4503                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4504                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4505                         </actions>
4506                 </permacrud>
4507         </class>
4508
4509         <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">
4510                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4511                         <field name="bucket" reporter:datatype="link"/>
4512                         <field name="id" reporter:datatype="id" />
4513                         <field name="target_call_number" reporter:datatype="link" />
4514                         <field name="create_time" reporter:datatype="timestamp" />
4515                         <field name="pos" reporter:datatype="int" />
4516                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4517                 </fields>
4518                 <links>
4519                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4520                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4521             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4522                 </links>
4523         </class>
4524         <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">
4525                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4526                         <field name="id" reporter:datatype="id" />
4527                         <field name="item" reporter:datatype="link"/>
4528                         <field name="note" reporter:datatype="text" />
4529                 </fields>
4530                 <links>
4531                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4532                 </links>
4533         </class>
4534         <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">
4535                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4536                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4537                         <field name="btype" reporter:datatype="text"/>
4538                         <field name="id" reporter:datatype="id" />
4539                         <field name="name" reporter:datatype="text"/>
4540                         <field name="description" reporter:datatype="text"/>
4541                         <field name="owner" reporter:datatype="link"/>
4542                         <field name="pub" reporter:datatype="bool"/>
4543                         <field name="create_time" reporter:datatype="timestamp" />
4544                 </fields>
4545                 <links>
4546                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4547                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4548                 </links>
4549         </class>
4550         <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">
4551                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4552                         <field name="id" reporter:datatype="id" />
4553                         <field name="bucket" reporter:datatype="link"/>
4554                         <field name="note" reporter:datatype="text" />
4555                 </fields>
4556                 <links>
4557                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4558                 </links>
4559         </class>
4560         <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">
4561                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4562                         <field name="hold" reporter:datatype="link"/>
4563                         <field name="id" reporter:datatype="id" />
4564                         <field name="target_copy" reporter:datatype="link"/>
4565                         <field name="proximity" reporter:datatype="number"/>
4566                 </fields>
4567                 <links>
4568                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4569                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4570                 </links>
4571         </class>
4572         <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">
4573                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4574                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4575                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4576                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4577                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4578                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4579                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4580                 </fields>
4581                 <links>
4582                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4583                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4584                 </links>
4585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4586             <actions>
4587                 <create permission="CREATE_HOLD_NOTIFICATION">
4588                                         <context link="hold" jump="usr" field="home_ou" />
4589                                 </create>
4590                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4591                                         <context link="hold" jump="usr" field="home_ou" />
4592                                 </retrieve>
4593                 <update permission="CREATE_HOLD_NOTIFICATION">
4594                                         <context link="hold" jump="usr" field="home_ou" />
4595                                 </update>
4596                 <delete permission="CREATE_HOLD_NOTIFICATION">
4597                                         <context link="hold" jump="usr" field="home_ou" />
4598                                 </delete>
4599             </actions>
4600         </permacrud>
4601         </class>
4602         <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">
4603                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4604                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4605                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4606                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4607                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4608                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4609                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4610                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4611                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4612                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4613                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4614                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4615                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4616                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4617                 </fields>
4618                 <links>
4619                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4620                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4621                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4622                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4623                 </links>
4624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4625             <actions>
4626                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4627                 <retrieve/>
4628                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4629                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4630             </actions>
4631         </permacrud>
4632         </class>
4633         <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">
4634                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4635                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4636                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4637                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4638                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4639             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4640             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4641             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4642                 </fields>
4643                 <links>
4644                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4645                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4646                 </links>
4647         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4648             <actions>
4649                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4650                 <retrieve/>
4651                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4652                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4653             </actions>
4654         </permacrud>
4655         </class>
4656         <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">
4657                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4658                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4659             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4660             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4661                 </fields>
4662                 <links>
4663                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4664                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4665                 </links>
4666         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4667             <actions>
4668                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4669                                         <context link="lgroup" field="owner" />
4670                 </create>
4671                 <retrieve/>
4672                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4673                                         <context link="lgroup" field="owner" />
4674                 </update>
4675                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4676                                         <context link="lgroup" field="owner" />
4677                 </delete>
4678             </actions>
4679         </permacrud>
4680         </class>
4681
4682     <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">
4683         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4684             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4685             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4686             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4687             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4688         </fields>
4689         <links>
4690             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4691             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4692         </links>
4693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4694             <actions>
4695                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4696                 <retrieve/>
4697                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4698                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4699             </actions>
4700         </permacrud>
4701     </class>
4702
4703         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4704                 <fields>
4705                         <field name="sre_id" oils_persist:virtual="true" />
4706                         <field name="location" oils_persist:virtual="true" />
4707                         <field name="owning_lib" oils_persist:virtual="true" />
4708                         <field name="basic_holdings" oils_persist:virtual="true" />
4709                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4710                         <field name="supplement_holdings" oils_persist:virtual="true" />
4711                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4712                         <field name="index_holdings" oils_persist:virtual="true" />
4713                         <field name="index_holdings_add" oils_persist:virtual="true" />
4714                         <field name="online" oils_persist:virtual="true" />
4715                         <field name="missing" oils_persist:virtual="true" />
4716                         <field name="incomplete" oils_persist:virtual="true" />
4717                 </fields>
4718         </class>
4719
4720         <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">
4721                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4722                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4723                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4724                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4725                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4726                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4727                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4728                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4729                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4730                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4731                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4732                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4733                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4734                 </fields>
4735                 <links>
4736                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4737                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4738                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4739                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4740                 </links>
4741                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4742                         <actions>
4743                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4744                                 <retrieve/>
4745                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4746                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4747                         </actions>
4748                 </permacrud>
4749         </class>
4750
4751         <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">
4752                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4753                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4754                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4755                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4756                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4757                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4758                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4759                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4760                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4761                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4762                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4763                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4764                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4765                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4766                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4767                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4768                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4769                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4770                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4771                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4772                 </fields>
4773                 <links>
4774                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4775                 </links>
4776                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4777                         <actions>
4778                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4779                                         <context link="subscription" field="owning_lib" />
4780                                 </create>
4781                                 <retrieve />
4782                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4783                                         <context link="subscription" field="owning_lib" />
4784                                 </update>
4785                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4786                                         <context link="subscription" field="owning_lib" />
4787                                 </delete>
4788                         </actions>
4789                 </permacrud>
4790         </class>
4791
4792         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4793                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4794                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4795                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4796                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4797                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4798                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4799                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4800                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4801                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4802                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4803                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4804                 </fields>
4805                 <links>
4806                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4807                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4808                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4809                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4810                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4811                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4812                 </links>
4813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4814                         <actions>
4815                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4816                                 <retrieve />
4817                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4818                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4819                         </actions>
4820                 </permacrud>
4821         </class>
4822
4823         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4824                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4825                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4826                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4827                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4828                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4829                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4830                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4831                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4832                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4833                 </fields>
4834                 <links>
4835                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4836                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4837                 </links>
4838         </class>
4839
4840         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4841                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4842                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4843                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4844                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4845                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4846                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4847                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4848                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4849                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4850                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4851                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4852                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4853                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4854                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4855                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4856                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4857                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4858                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4859                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4860                 </fields>
4861                 <links>
4862                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4863                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4864                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4865                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4866                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4867                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4868                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4869                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4870                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4871                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4872                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4873                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4874                 </links>
4875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4876                         <actions>
4877                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4878                                 <retrieve />
4879                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4880                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4881                         </actions>
4882                 </permacrud>
4883         </class>
4884
4885         <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">
4886                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4887                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4888                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4889                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4890                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4891                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4892                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4893                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4894                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4895                 </fields>
4896                 <links>
4897                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4898                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4899                 </links>
4900                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4901                         <actions>
4902                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4903                                         <context link="distribution" field="holding_lib" />
4904                                 </create>
4905                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4906                                         <context link="distribution" field="holding_lib" />
4907                                 </retrieve>
4908                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4909                                         <context link="distribution" field="holding_lib" />
4910                                 </update>
4911                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4912                                         <context link="distribution" field="holding_lib" />
4913                                 </delete>
4914                         </actions>
4915                 </permacrud>
4916         </class>
4917
4918         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4919                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4920                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4921                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4922                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4923                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4924                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4925                 </fields>
4926                 <links>
4927                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4928                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4929                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4930                 </links>
4931                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4932                         <actions>
4933                                 <create permission="ADMIN_SERIAL_STREAM">
4934                                         <context link="distribution" field="holding_lib" />
4935                                 </create>
4936                                 <retrieve />
4937                                 <update permission="ADMIN_SERIAL_STREAM">
4938                                         <context link="distribution" field="holding_lib" />
4939                                 </update>
4940                                 <delete permission="ADMIN_SERIAL_STREAM">
4941                                         <context link="distribution" field="holding_lib" />
4942                                 </delete>
4943                         </actions>
4944                 </permacrud>
4945         </class>
4946
4947         <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">
4948                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4949                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4950                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4951                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4952                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4953                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4954                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4955                 </fields>
4956                 <links>
4957                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4958                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4959                 </links>
4960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4961                         <actions>
4962                                 <create permission="ADMIN_SERIAL_STREAM">
4963                                         <context link="stream" jump="distribution" field="holding_lib" />
4964                                 </create>
4965                                 <retrieve permission="RECEIVE_SERIAL">
4966                                         <context link="stream" jump="distribution" field="holding_lib" />
4967                                 </retrieve>
4968                                 <update permission="ADMIN_SERIAL_STREAM">
4969                                         <context link="stream" jump="distribution" field="holding_lib" />
4970                                 </update>
4971                                 <delete permission="ADMIN_SERIAL_STREAM">
4972                                         <context link="stream" jump="distribution" field="holding_lib" />
4973                                 </delete>
4974                         </actions>
4975                 </permacrud>
4976         </class>
4977
4978         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4979                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4980                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4981                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4982                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4983                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4984                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4985                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4986                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4987                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4988                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4989                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4990                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4991                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4992                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4993                 </fields>
4994                 <links>
4995                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4996                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4997                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4998                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4999                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
5000                 </links>
5001                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5002                         <actions>
5003                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
5004                                         <context link="subscription" field="owning_lib" />
5005                                 </create>
5006                                 <retrieve/>
5007                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
5008                                         <context link="subscription" field="owning_lib" />
5009                                 </update>
5010                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
5011                                         <context link="subscription" field="owning_lib" />
5012                                 </delete>
5013                         </actions>
5014                 </permacrud>
5015         </class>
5016
5017         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
5018                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5019                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5020                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5021                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5022                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5023                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5024                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5025                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5026                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5027                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5028                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5029                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5030                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5031                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5032                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5033                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5034                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5035                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5036                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5037                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5038                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5039                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5040                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5041                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5042                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5043                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5044                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5045                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5046                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5047                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5048                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5049                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5050                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5051                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5052                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5053                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5054                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5055                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5056                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5057                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5058                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5059                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5060                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5061                 </fields>
5062                 <links>
5063                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5064                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5065                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5066                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5067                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5068                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5069                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5070                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5071                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5072                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5073                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5074                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5075                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5076                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5077                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5078                 </links>
5079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5080                         <actions>
5081                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5082                                 <retrieve/>
5083                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5084                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5085                         </actions>
5086                 </permacrud>
5087         </class>
5088
5089         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5090                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5091                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5092                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5093                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5094                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5095                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5096                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5097                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5098                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5099                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5100                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5101                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5102                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5103                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5104                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5105                 </fields>
5106                 <links>
5107                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5108                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5109                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5110                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5111                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5112                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5113                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5114                 </links>
5115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5116                         <actions>
5117                                 <create permission="ADMIN_SERIAL_ITEM">
5118                                         <context link="stream" jump="distribution" field="holding_lib" />
5119                                 </create>
5120                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5121                                         <context link="stream" jump="distribution" field="holding_lib" />
5122                                 </retrieve>
5123                                 <update permission="ADMIN_SERIAL_ITEM">
5124                                         <context link="stream" jump="distribution" field="holding_lib" />
5125                                 </update>
5126                                 <delete permission="ADMIN_SERIAL_ITEM">
5127                                         <context link="stream" jump="distribution" field="holding_lib" />
5128                                 </delete>
5129                         </actions>
5130                 </permacrud>
5131         </class>
5132
5133         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5134                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5135                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5136                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5137                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5138                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5139                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5140                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5141                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5142                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5143                 </fields>
5144                 <links>
5145                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5146                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5147                 </links>
5148                 <!-- Not available via PCRUD at this time -->
5149         </class>
5150         <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">
5151                 <fields>
5152                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5153                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5154                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5155                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5156                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5157                 </fields>
5158                 <links>
5159                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5160                 </links>
5161         </class>
5162         <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">
5163                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5164                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5165                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5166                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5167                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5168                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5169                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5170                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5171                 </fields>
5172                 <links>
5173                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5174                 </links>
5175         </class>
5176         <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">
5177                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5178                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5179                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5180                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5181                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5182                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5183                 </fields>
5184                 <links>
5185                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5186                 </links>
5187                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5188                         <actions>
5189                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5190                                         <context link="distribution" field="holding_lib" />
5191                                 </create>
5192                                 <retrieve/>
5193                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5194                                         <context link="distribution" field="holding_lib" />
5195                                 </update>
5196                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5197                                         <context link="distribution" field="holding_lib" />
5198                                 </delete>
5199                         </actions>
5200                 </permacrud>
5201         </class>
5202
5203         <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">
5204                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5205                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5206                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5207                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5208                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5209                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5210                 </fields>
5211                 <links>
5212                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5213                 </links>
5214                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5215                         <actions>
5216                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5217                                         <context link="distribution" field="holding_lib" />
5218                                 </create>
5219                                 <retrieve/>
5220                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5221                                         <context link="distribution" field="holding_lib" />
5222                                 </update>
5223                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5224                                         <context link="distribution" field="holding_lib" />
5225                                 </delete>
5226                         </actions>
5227                 </permacrud>
5228         </class>
5229
5230         <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">
5231                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5232                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5233                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5234                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5235                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5236                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5237                 </fields>
5238                 <links>
5239                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5240                 </links>
5241                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5242                         <actions>
5243                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5244                                         <context link="distribution" field="holding_lib" />
5245                                 </create>
5246                                 <retrieve/>
5247                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5248                                         <context link="distribution" field="holding_lib" />
5249                                 </update>
5250                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5251                                         <context link="distribution" field="holding_lib" />
5252                                 </delete>
5253                         </actions>
5254                 </permacrud>
5255         </class>
5256
5257         <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">
5258                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5259                         <field name="id" reporter:datatype="id" />
5260                         <field name="owning_copy" reporter:datatype="link"/>
5261                         <field name="stat_cat" reporter:datatype="link"/>
5262                         <field name="stat_cat_entry" reporter:datatype="link"/>
5263                 </fields>
5264                 <links>
5265                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5266                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5267                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5268                 </links>
5269                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5270                         <actions>
5271                                 <retrieve/>
5272                         </actions>
5273                 </permacrud>
5274         </class>
5275         <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">
5276                 <fields oils_persist:primary="code">
5277                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5278                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5279                 </fields>
5280                 <links/>
5281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5282             <actions>
5283                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5284                 <retrieve/>
5285                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5286                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5287             </actions>
5288         </permacrud>
5289         </class>
5290         <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">
5291                 <fields oils_persist:primary="code">
5292                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5293                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5294                 </fields>
5295                 <links/>
5296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5297             <actions>
5298                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5299                 <retrieve/>
5300                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5301                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5302             </actions>
5303         </permacrud>
5304         </class>
5305         <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">
5306                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5307                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5308                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5309                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5310                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5311                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5312                 </fields>
5313                 <links>
5314             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5315         </links>
5316         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5317             <actions>
5318                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5319                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5320                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5321                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5322             </actions>
5323         </permacrud>
5324         </class>
5325         <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">
5326                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5327                         <field name="id" reporter:datatype="id" />
5328                         <field name="name" reporter:datatype="text"/>
5329                 </fields>
5330                 <links/>
5331         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5332             <actions>
5333                 <create permission="CREATE_LASSO" global_required="true"/>
5334                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5335                 <update permission="UPDATE_LASSO" global_required="true"/>
5336                 <delete permission="DELETE_LASSO" global_required="true"/>
5337             </actions>
5338         </permacrud>
5339         </class>
5340         <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">
5341                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5342                         <field name="id" reporter:datatype="id" />
5343                         <field name="lasso" reporter:datatype="link"/>
5344                         <field name="org_unit" reporter:datatype="org_unit"/>
5345                 </fields>
5346                 <links>
5347                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5348                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5349                 </links>
5350         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5351             <actions>
5352                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5353                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5354                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5355                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5356             </actions>
5357         </permacrud>
5358         </class>
5359         <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">
5360                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5361                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5362                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5363                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5364                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5365                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5366                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5367                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5368                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5369                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5370                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5371                 </fields>
5372                 <links>
5373                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5374                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5375                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5376                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5377                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5378                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5379                 </links>
5380         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5381             <actions>
5382                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5383                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5384                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5385                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5386             </actions>
5387         </permacrud>
5388         </class>
5389         <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">
5390                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5391                         <field name="id" reporter:datatype="id" />
5392                         <field name="from_org" reporter:datatype="org_unit"/>
5393                         <field name="to_org" reporter:datatype="org_unit"/>
5394                         <field name="prox" reporter:datatype="int" />
5395                 </fields>
5396                 <links>
5397                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5398                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5399                 </links>
5400         </class>
5401         <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">
5402                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5403                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5404                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5405                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5406                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5407                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5408                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5409                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5410                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5411                 </fields>
5412                 <links/>
5413         </class>
5414         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5415                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5416                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5417                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5418                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5419                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5420                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5421                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5422                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5423                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5424                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5425                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5426                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5427                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5428                 </fields>
5429                 <links>
5430                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5431                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5432                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5433                 </links>
5434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5435             <actions>
5436                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5437                 <retrieve/>
5438                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5439                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5440             </actions>
5441         </permacrud>
5442         </class>
5443         <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">
5444                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5445                         <field name="address_type"  reporter:datatype="text"/>
5446                         <field name="city"  reporter:datatype="text"/>
5447                         <field name="country"  reporter:datatype="text"/>
5448                         <field name="county"  reporter:datatype="text"/>
5449                         <field name="id" reporter:datatype="id" />
5450                         <field name="org_unit" reporter:datatype="org_unit"/>
5451                         <field name="post_code"  reporter:datatype="text"/>
5452                         <field name="state"  reporter:datatype="text"/>
5453                         <field name="street1"  reporter:datatype="text"/>
5454                         <field name="street2"  reporter:datatype="text"/>
5455                         <field name="valid" reporter:datatype="bool"/>
5456                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5457                 </fields>
5458                 <links>
5459                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5460                 </links>
5461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5462             <actions>
5463                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5464                 <retrieve/>
5465                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5466                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5467             </actions>
5468         </permacrud>
5469         </class>
5470         <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">
5471                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5472                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5473                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5474                         <field name="query_text" reporter:datatype="text"/>
5475                 </fields>
5476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5477             <actions>
5478                 <retrieve/>
5479             </actions>
5480         </permacrud>
5481         </class>
5482
5483         <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">
5484                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5485                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5486                         <field name="owner" reporter:datatype="org_unit"/>
5487                         <field name="code" reporter:datatype="text"/>
5488                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5489                         <field name="create_date" reporter:datatype="timestamp"/>
5490                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5491                 </fields>
5492                 <links>
5493                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5494                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5495                 </links>
5496         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5497             <actions>
5498                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5499                 <retrieve/>
5500                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5501                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5502             </actions>
5503         </permacrud>
5504         </class>
5505         <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">
5506                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5507                         <field name="id" reporter:datatype="id"/>
5508                         <field name="grp" reporter:datatype="link"/>
5509                         <field name="pos" reporter:datatype="int"/>
5510                         <field name="query" reporter:datatype="link"/>
5511                 </fields>
5512                 <links>
5513                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5514                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5515                 </links>
5516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5517             <actions>
5518                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5519                     <context link="grp" field="owner"/>
5520                 </create>
5521                 <retrieve/>
5522                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5523                     <context link="grp" field="owner"/>
5524                 </update>
5525                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5526                     <context link="grp" field="owner"/>
5527                 </delete>
5528             </actions>
5529         </permacrud>
5530         </class>
5531
5532         <!-- A note: Please update alhr and ahopl when updating ahr -->
5533         <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">
5534                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5535                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5536                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5537                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5538                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5539                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5540                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5541                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5542                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5543                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5544                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5545                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5546                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5547                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5548                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5549                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5550                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5551                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5552                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5553                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5554                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5555                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5556                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5557                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5558                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5559                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5560                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5561                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5562                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5563                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5564                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5565                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5566                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5567                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5568                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5569                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5570                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5571                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5572                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5573                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5574                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5575                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5576                 </fields>
5577                 <links>
5578                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5579                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5580                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5581                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5582                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5583                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5584                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5585                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5586                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5587                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5588                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5589                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5590                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5591                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5592                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5593                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5594                 </links>
5595                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5596                         <actions>
5597                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5598                         </actions>
5599                 </permacrud>
5600         </class>
5601         <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">
5602                 <oils_persist:source_definition><![CDATA[
5603                 SELECT
5604                         ahr.*,
5605                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5606                                 copy_location_order_position,
5607                         CASE WHEN au.alias IS NOT NULL THEN
5608                                 au.alias
5609                         ELSE
5610                                 au.first_given_name
5611                         END AS usr_alias_or_first_given_name,
5612                         au.first_given_name AS usr_first_given_name,
5613                         au.second_given_name AS usr_second_given_name,
5614                         au.family_name AS usr_family_name,
5615                         au.prefix AS usr_prefix,
5616                         au.suffix AS usr_suffix,
5617                         au.alias AS usr_alias,
5618                         CASE WHEN au.alias IS NOT NULL THEN
5619                                 au.alias
5620                         ELSE
5621                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5622                                         COALESCE(au.family_name, ''),
5623                                         COALESCE(au.suffix, ''),
5624                                         ', ',
5625                                         COALESCE(au.prefix, ''),
5626                                         COALESCE(au.first_given_name, ''),
5627                                         COALESCE(au.second_given_name, '')
5628                                 ], ' '), E'\\s+,', ',')
5629                         END AS usr_alias_or_display_name,
5630                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5631                                 COALESCE(au.family_name, ''),
5632                                 COALESCE(au.suffix, ''),
5633                                 ', ',
5634                                 COALESCE(au.prefix, ''),
5635                                 COALESCE(au.first_given_name, ''),
5636                                 COALESCE(au.second_given_name, '')
5637                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5638                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5639                                 AS call_number_label,
5640                         siss.label AS issuance_label,
5641                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5642                         ahcm_1.copy_count AS potential_copies
5643                 FROM action.hold_request ahr
5644                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5645                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5646                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5647                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5648                 JOIN actor.usr au ON (au.id = ahr.usr)
5649                 JOIN (
5650                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5651                         FROM asset.copy_location
5652                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5653                 LEFT JOIN actor.usr_standing_penalty ausp 
5654                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5655                 LEFT JOIN config.standing_penalty csp
5656                         ON (
5657                                 csp.id = ausp.standing_penalty AND 
5658                                 csp.block_list LIKE '%CAPTURE%' AND (
5659                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5660                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5661                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5662                                         )
5663                                 )
5664                         )
5665                 JOIN (
5666                         SELECT COUNT(target_copy) AS copy_count, hold
5667                         FROM action.hold_copy_map
5668                         GROUP BY 2
5669                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5670                 LEFT JOIN serial.issuance siss
5671                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5672                 LEFT JOIN asset.copy_location_order acplo
5673                         ON (acp.location = acplo.location AND
5674                                 acp.circ_lib = acplo.org)
5675                 WHERE
5676                         ahr.capture_time IS NULL AND
5677                         ahr.cancel_time IS NULL AND
5678                         csp.id IS NULL AND
5679                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5680                         acp.status IN (0,7)
5681                 ]]></oils_persist:source_definition>
5682                 <fields oils_persist:primary="id">
5683                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5684                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5685                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5686                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5687                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5688                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5689                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5690                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5691                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5692                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5693                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5694                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5695                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5696                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5697                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5698                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5699                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5700                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5701                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5702                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5703                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5704                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5705                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5706                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5707                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5708                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5709                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5710                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5711                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5712                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5713                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5714                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5715                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5716                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5717                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5718                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5719                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5720                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5721                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5722                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5723                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5724                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5725                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5726                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5727                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5728                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5729                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5730                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5731                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5732                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5733                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5734                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5735                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5736                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5737                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5738                 </fields>
5739                 <links>
5740                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5741                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5742                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5743                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5744                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5745                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5746                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5747                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5748                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5749                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5750                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5751                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5752                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5753                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5754                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5755                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5756                 </links>
5757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5758                         <actions>
5759                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5760                         </actions>
5761                 </permacrud>
5762         </class>
5763         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5764                 <oils_persist:source_definition>
5765                         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)
5766                 </oils_persist:source_definition>
5767                 <fields oils_persist:primary="id">
5768                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5769                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5770                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5771                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5772                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5773                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5774                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5775                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5776                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5777                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5778                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5779                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5780                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5781                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5782                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5783                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5784                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5785                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5786                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5787                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5788                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5789                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5790                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5791                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5792                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5793                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5794                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5795                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5796                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5797                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5798                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5799                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5800                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5801                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5802                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5803                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5804                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5805                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5806                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5807                 </fields>
5808                 <links>
5809                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5810                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5811                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5812                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5813                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5814                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5815                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5816                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5817                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5818                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5819                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5820                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5821                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5822                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5823                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5824                 </links>
5825         </class>
5826
5827         <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">
5828                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5829                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5830                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5831                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5832                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5833                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5834                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5835                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5836                 </fields>
5837                 <links>
5838                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5839                 </links>
5840                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5841                         <actions>
5842                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5843                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5844                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5845                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5846                         </actions>
5847                 </permacrud>
5848         </class>
5849         <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">
5850                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5851                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5852                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5853                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5854                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5855                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5856                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5857                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5858                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5859                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5860                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5861                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5862                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5863                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5864                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5865                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5866                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5867                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5868                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5869                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5870                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5871                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5872                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5873                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5874                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5875                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5876                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5877                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5878                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5879                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5880                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5881                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5882                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5883                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5884                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5885                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5886                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5887                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5888                 </fields>
5889                 <links>
5890                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5891                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5892                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5893                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5894                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5895                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5896                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5897                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5898                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5899                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5900                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5901                 </links>
5902                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5903                         <actions>
5904                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5905                         </actions>
5906                 </permacrud>
5907         </class>
5908         <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">
5909                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5910                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5911                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5912                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5913                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5914                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5915                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5916                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5917                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5918                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5919                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5920                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5921                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5922                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5923                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5924                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5925                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5926                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5927                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5928                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5929                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5930                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5931                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5932                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5933                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5934                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5935                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5936                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5937                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5938                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5939                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5940                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5941                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5942                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5943                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5944                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5945                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5946                 </fields>
5947                 <links>
5948                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5949                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5950                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5951                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5952                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5953                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5954                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5955                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5956                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5957                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5958                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5959                 </links>
5960                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5961                         <actions>
5962                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5963                         </actions>
5964                 </permacrud>
5965         </class>
5966
5967         <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">
5968                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5969                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5970                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5971                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5972                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5973                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5974                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5975                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5976                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5977                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5978                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5979                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5980                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5981                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5982                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5983                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5984                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5985                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5986                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5987                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5988                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5989                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5990                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5991                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5992                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5993                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5994                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5995                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5996                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5997                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5998                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5999                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
6000                 </fields>
6001                 <links>
6002                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
6003                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
6004                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
6005                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
6006                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
6007                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
6008                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
6009                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
6010                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
6011                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
6012                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
6013                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
6014                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
6015                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
6016                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
6017                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
6018                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
6019                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
6020                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
6021                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
6022                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
6023                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
6024                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
6025                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
6026                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6027                 </links>
6028         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6029             <actions>
6030                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6031                 <retrieve />
6032                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6033                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6034             </actions>
6035         </permacrud>
6036         </class>
6037         <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">
6038                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6039                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6040                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6041                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6042                 </fields>
6043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6044                         <actions>
6045                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6046                                 <retrieve/>
6047                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6048                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6049                         </actions>
6050                 </permacrud>
6051         </class>
6052         <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">
6053                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6054                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6055                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6056                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6057                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6058                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6059                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6060                 </fields>
6061                 <links>
6062                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6063                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6064                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6065                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6066                 </links>
6067                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6068                         <actions>
6069                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6070                                 <retrieve/>
6071                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6072                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6073                         </actions>
6074                 </permacrud>
6075         </class>
6076         <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">
6077                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6078                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6079                         <field name="btype" reporter:datatype="text"/>
6080                         <field name="id" reporter:datatype="id" />
6081                         <field name="name"  reporter:datatype="text"/>
6082                         <field name="description" reporter:datatype="text"/>
6083                         <field name="owner" reporter:datatype="link"/>
6084                         <field name="pub" reporter:datatype="bool"/>
6085                         <field name="create_time" reporter:datatype="timestamp" />
6086                 </fields>
6087                 <links>
6088                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6089                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6090                 </links>
6091         </class>
6092         <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">
6093                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6094                         <field name="id" reporter:datatype="id" />
6095                         <field name="bucket" reporter:datatype="link"/>
6096                         <field name="note" reporter:datatype="text" />
6097                 </fields>
6098                 <links>
6099                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6100                 </links>
6101         </class>
6102         <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">
6103                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6104                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6105                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6106                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6107                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6108                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6109                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6110                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6111                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6112                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6113                 </fields>
6114                 <links>
6115                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6116                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6117                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6118                 </links>
6119                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6120                         <actions>
6121                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6122                         </actions>
6123                 </permacrud>
6124         </class>
6125         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6126                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6127                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6128                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6129                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6130                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6131                 </fields>
6132                 <links>
6133                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6134                 </links>
6135                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6136                         <actions>
6137                                 <retrieve permission="VIEW_USER">
6138                                         <context link="usr" field="home_ou" />
6139                                 </retrieve>
6140                         </actions>
6141                 </permacrud>
6142         </class>
6143     <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">
6144         <fields oils_persist:primary="field">
6145             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6146             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6147             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6148         </fields>
6149         <links/>
6150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6151             <actions>
6152                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6153                 <retrieve />
6154                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6155                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6156             </actions>
6157         </permacrud>
6158     </class>
6159         <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">
6160                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6161                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6162                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6163                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6164                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6165                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6166                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6167                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6168                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6169                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6170                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6171                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6172                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6173                 </fields>
6174                 <links>
6175                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6176                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6177                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6178                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6179                 </links>
6180         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6181             <actions>
6182                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6183                 <retrieve />
6184                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6185                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6186             </actions>
6187         </permacrud>
6188         </class>
6189         <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">
6190                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6191                         <field name="field" reporter:datatype="link"/>
6192                         <field name="id" reporter:datatype="id" />
6193                         <field name="source" reporter:datatype="link"/>
6194                         <field name="value"  reporter:datatype="text"/>
6195                 </fields>
6196                 <links>
6197                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6198                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6199                 </links>
6200         </class>
6201         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6202                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6203                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6204                         <field name="btype" reporter:datatype="text"/>
6205                         <field name="id" reporter:datatype="id" />
6206                         <field name="name"  reporter:datatype="text"/>
6207                         <field name="description" reporter:datatype="text"/>
6208                         <field name="owner" reporter:datatype="link"/>
6209                         <field name="pub" reporter:datatype="bool"/>
6210                         <field name="create_time" reporter:datatype="timestamp" />
6211                 </fields>
6212                 <links>
6213                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6214                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6215                 </links>
6216         </class>
6217         <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">
6218                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6219                         <field name="id" reporter:datatype="id" />
6220                         <field name="bucket" reporter:datatype="link"/>
6221                         <field name="note" reporter:datatype="text" />
6222                 </fields>
6223                 <links>
6224                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6225                 </links>
6226         </class>
6227         <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">
6228                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6229                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6230                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6231                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6232                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6233                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6234                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6235                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6236                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6237                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6238                 </fields>
6239                 <links>
6240                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6241                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6242                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6243                 </links>
6244         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6245             <actions>
6246                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6247                     <context link="xact" jump="usr" field="home_ou"/>
6248                 </retrieve>
6249                         </actions>
6250                 </permacrud>
6251         </class>
6252         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6253                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6254                         <field name="id" reporter:datatype="id" />
6255                         <field name="ind1" />
6256                         <field name="ind2" />
6257                         <field name="record" />
6258                         <field name="subfield" />
6259                         <field name="tag" />
6260                         <field name="value" />
6261                 </fields>
6262                 <links>
6263                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6264                 </links>
6265         </class>
6266         <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">
6267                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6268                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6269                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6270                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6271                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6272                 </fields>
6273                 <links>
6274                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6275                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6276                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6277                 </links>
6278         </class>
6279         <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">
6280                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6281                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6282                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6283                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6284                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6285                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6286                 </fields>
6287                 <links>
6288                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6289                 </links>
6290         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6291             <actions>
6292                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6293                 <retrieve/>
6294                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6295                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6296             </actions>
6297         </permacrud>
6298
6299         </class>
6300         <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">
6301                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6302                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6303                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6304                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6305                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6306                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6307                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6308                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6309                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6310                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6311                 </fields>
6312                 <links>
6313                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6314                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6315                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6316                 </links>
6317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6318             <actions>
6319                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6320                 <retrieve/>
6321                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6322                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6323             </actions>
6324         </permacrud>
6325         </class>
6326         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6327                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6328                         <field name="create_date" reporter:datatype="timestamp"/>
6329                         <field name="creator" reporter:datatype="link"/>
6330                         <field name="edit_date" reporter:datatype="timestamp"/>
6331                         <field name="editor" reporter:datatype="link"/>
6332                         <field name="id" reporter:datatype="id" />
6333                         <field name="pub" reporter:datatype="bool"/>
6334                         <field name="record" reporter:datatype="link"/>
6335                         <field name="value"  reporter:datatype="text"/>
6336                 </fields>
6337                 <links>
6338                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6339                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6340                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6341                 </links>
6342         </class>
6343         <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">
6344                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6345                         <field name="balance_owed" reporter:datatype="money" />
6346                         <field name="total_owed" reporter:datatype="money" />
6347                         <field name="total_paid" reporter:datatype="money" />
6348                         <field name="usr" reporter:datatype="link"/>
6349                 </fields>
6350                 <links>
6351                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6352                 </links>
6353         </class>
6354         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6355                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6356                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6357                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6358                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6359                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6360                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6361                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6362                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6363                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6364                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6365                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6366                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6367                 </fields>
6368                 <links>
6369                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6370                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6371                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6372                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6373                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6374                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6375                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6376                 </links>
6377         </class>
6378         <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">
6379                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6380                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6381                         <field name="quality" reporter:datatype="int" />
6382                         <field name="source" reporter:datatype="text"/>
6383                         <field name="transcendant" reporter:datatype="bool"/>
6384                         <field name="can_have_copies" reporter:datatype="bool"/>
6385                 </fields>
6386                 <links/>
6387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6388             <actions>
6389                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6390                 <retrieve/>
6391                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6392                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6393             </actions>
6394         </permacrud>
6395         </class>
6396         <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">
6397                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6398                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6399                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6400                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6401                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6402                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6403                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6404                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6405                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6406                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6407                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6408                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6409                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6410                 </fields>
6411                 <links>
6412                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6413                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6414                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6415                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6416                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6417                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6418                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6419                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6420                 </links>
6421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6422                         <actions>
6423                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6424                                         <context link="usr" field="home_ou" />
6425                                 </retrieve>
6426                         </actions>
6427                 </permacrud>
6428         </class>
6429         <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">
6430                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6431                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6432                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6433                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6434                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6435                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6436                 </fields>
6437                 <links>
6438                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6439                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6440                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6441                 </links>
6442         </class>
6443         <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">
6444                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6445                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6446                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6447                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6448                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6449                 </fields>
6450                 <links>
6451                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6452                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6453                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6454                 </links>
6455         </class>
6456         <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">
6457                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6458                         <field name="bucket" reporter:datatype="link"/>
6459                         <field name="id" reporter:datatype="id" />
6460                         <field name="target_user" reporter:datatype="link"/>
6461                         <field name="create_time" reporter:datatype="timestamp" />
6462                         <field name="pos" reporter:datatype="int" />
6463                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6464                 </fields>
6465                 <links>
6466                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6467                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6468             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6469                 </links>
6470         </class>
6471         <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">
6472                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6473                         <field name="id" reporter:datatype="id" />
6474                         <field name="item" reporter:datatype="link"/>
6475                         <field name="note" reporter:datatype="text" />
6476                 </fields>
6477                 <links>
6478                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6479                 </links>
6480         </class>
6481         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6482                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6483                         <field name="balance_owed" reporter:datatype="money" />
6484                         <field name="total_owed" reporter:datatype="money" />
6485                         <field name="total_paid" reporter:datatype="money" />
6486                         <field name="usr" reporter:datatype="link"/>
6487                 </fields>
6488                 <links>
6489                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6490                 </links>
6491         </class>
6492         <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">
6493                 <fields oils_persist:primary="code" oils_persist:sequence="">
6494                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6495                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6496                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6497                 </fields>
6498                 <links/>
6499         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6500             <actions>
6501                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6502                 <retrieve/>
6503                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6504                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6505             </actions>
6506         </permacrud>
6507         </class>
6508         <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">
6509                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6510                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6511                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6512                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6513                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6514                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6515                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6516                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6517                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6518                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6519                 </fields>
6520                 <links>
6521                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6522                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6523                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6524                 </links>
6525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6526             <actions>
6527                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6528                     <context link="xact" jump="usr" field="home_ou"/>
6529                 </retrieve>
6530                         </actions>
6531                 </permacrud>
6532         </class>
6533         <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">
6534                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6535                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6536                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6537                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6538                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6539                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6540                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6541                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6542                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6543                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6544                 </fields>
6545                 <links>
6546                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6547                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6548                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6549                 </links>
6550         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6551             <actions>
6552                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6553                     <context link="xact" jump="usr" field="home_ou"/>
6554                 </retrieve>
6555                         </actions>
6556                 </permacrud>
6557         </class>
6558         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6559                 <fields oils_persist:primary="id" oils_persist:sequence="">
6560                         <field name="checkin_lib" reporter:datatype="link"/>
6561                         <field name="checkin_staff" reporter:datatype="link"/>
6562                         <field name="checkin_time" reporter:datatype="timestamp"/>
6563                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6564                         <field name="circ_staff" reporter:datatype="link"/>
6565                         <field name="desk_renewal" reporter:datatype="bool"/>
6566                         <field name="due_date" reporter:datatype="timestamp"/>
6567                         <field name="duration" reporter:datatype="interval"/>
6568                         <field name="duration_rule" reporter:datatype="link"/>
6569                         <field name="fine_interval" reporter:datatype="interval"/>
6570                         <field name="id" reporter:datatype="id" />
6571                         <field name="max_fine" reporter:datatype="money" />
6572                         <field name="max_fine_rule" reporter:datatype="link"/>
6573                         <field name="opac_renewal" reporter:datatype="bool"/>
6574                         <field name="phone_renewal" reporter:datatype="bool"/>
6575                         <field name="recurring_fine" reporter:datatype="money" />
6576                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6577                         <field name="renewal_remaining" reporter:datatype="int" />
6578             <field name="grace_period" reporter:datatype="interval" />
6579                         <field name="stop_fines" reporter:datatype="text"/>
6580                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6581                         <field name="target_copy" reporter:datatype="link"/>
6582                         <field name="usr" reporter:datatype="link"/>
6583                         <field name="xact_finish" reporter:datatype="timestamp" />
6584                         <field name="xact_start" reporter:datatype="timestamp" />
6585                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6586                 </fields>
6587                 <links>
6588                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6589                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6590                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6591                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6592                 </links>
6593         </class>
6594         <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">
6595                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6596                         <field name="field" reporter:datatype="link"/>
6597                         <field name="id" reporter:datatype="id" />
6598                         <field name="source" reporter:datatype="link"/>
6599                         <field name="value" reporter:datatype="text"/>
6600                 </fields>
6601                 <links>
6602                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6603                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6604                 </links>
6605         </class>
6606         <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">
6607                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6608                         <field name="high" reporter:datatype="money" />
6609                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6610                         <field name="low" reporter:datatype="money" />
6611                         <field name="name" reporter:datatype="text"/>
6612                         <field name="normal" reporter:datatype="money" />
6613                         <field name="recurrence_interval" reporter:datatype="interval"/>
6614             <field name="grace_period" reporter:datatype="interval" />
6615                 </fields>
6616                 <links/>
6617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6618             <actions>
6619                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6620                 <retrieve/>
6621                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6622                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6623             </actions>
6624         </permacrud>
6625         </class>
6626         <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">
6627                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6628                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6629                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6630                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6631                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6632                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6633                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6634                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6635                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6636                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6637                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6638                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6639                 </fields>
6640                 <links>
6641                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6642                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6643                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6644                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6645                 </links>
6646         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6647             <actions>
6648                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6649                     <context link="xact" jump="usr" field="home_ou"/>
6650                 </retrieve>
6651                         </actions>
6652                 </permacrud>
6653         </class>
6654         <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">
6655                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6656                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6657                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6658                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6659                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6660                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6661                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6662                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6663                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6664                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6665                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6666                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6667                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6668                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6669                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6670                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6671                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6672                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6673                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6674                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6675                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6676                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6677                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6678                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6679                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6680                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6681                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6682                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6683                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6684                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6685                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6686                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6687                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6688                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6689                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6690                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6691                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6692                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6693                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6694                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6695                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6696                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6697                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6698                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6699                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6700                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6701                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6702                         <field reporter:label="Has Holds" name="holds_count" oils_persist:virtual="true" reporter:datatype="link"/>
6703                 </fields>
6704                 <links>
6705                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6706                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6707                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6708                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6709                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6710                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6711                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6712                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6713                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6714                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6715                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6716                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6717                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6718                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6719                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6720                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6721                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6722                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6723                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6724                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6725                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6726                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6727                         <link field="holds_count" reltype="might_have" key="id" map="" class="hasholdscount"/>
6728                 </links>
6729         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6730             <actions>
6731                 <create permission="CREATE_COPY">
6732                     <context link="call_number" field="owning_lib"/>
6733                 </create>
6734                 <retrieve/>
6735                 <update permission="UPDATE_COPY">
6736                     <context link="call_number" field="owning_lib"/>
6737                 </update>
6738                 <delete permission="DELETE_COPY">
6739                     <context link="call_number" field="owning_lib"/>
6740                 </delete>
6741             </actions>
6742         </permacrud>
6743         </class>
6744
6745         <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">
6746                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6747                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6748                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6749                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6750                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6751                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6752                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6753                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6754                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6755                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6756                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6757                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6758                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6759                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6760                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6761                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6762                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6763                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6764                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6765                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6766                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6767                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6768                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6769                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6770                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6771                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6772                 </fields>
6773                 <links>
6774                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6775                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6776                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6777                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6778                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6779                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6780                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6781                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6782                 </links>
6783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6784                         <actions>
6785                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6786                                 <retrieve />
6787                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6788                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6789                         </actions>
6790                 </permacrud>
6791         </class>
6792
6793         <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">
6794                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6795                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6796                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6797                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6798                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6799                 </fields>
6800                 <links/>
6801         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6802             <actions>
6803                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6804                 <retrieve/>
6805                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6806                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6807             </actions>
6808         </permacrud>
6809         </class>
6810         <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">
6811                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6812                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6813                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6814                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6815                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6816                 </fields>
6817                 <links/>
6818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6819             <actions>
6820                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6821                 <retrieve/>
6822                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6823                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6824             </actions>
6825         </permacrud>
6826         </class>
6827         <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">
6828                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6829                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6830                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6831                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6832                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6833                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6834                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6835                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6836                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6837                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6838                 </fields>
6839                 <links>
6840                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6841                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6842                 </links>
6843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6844             <actions>
6845                 <create permission="CREATE_PERM" global_required="true"/>
6846                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6847                 <update permission="UPDATE_PERM" global_required="true"/>
6848                 <delete permission="DELETE_PERM" global_required="true"/>
6849             </actions>
6850         </permacrud>
6851         </class>
6852         <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">
6853                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6854                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6855                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6856                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6857                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6858                 </fields>
6859                 <links>
6860                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6861                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6862                 </links>
6863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6864             <actions>
6865                 <create permission="ADMIN_SURVEY">
6866                     <context link="question" jump="survey" field="owner"/>
6867                 </create>
6868                 <retrieve/>
6869                 <update permission="ADMIN_SURVEY">
6870                     <context link="question" jump="survey" field="owner"/>
6871                 </update>
6872                 <delete permission="ADMIN_SURVEY">
6873                     <context link="question" jump="survey" field="owner"/>
6874                 </delete>
6875             </actions>
6876         </permacrud>
6877         </class>
6878         <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">
6879                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6880                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6881                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6882                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6883                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6884                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6885                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6886                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6887                 </fields>
6888                 <links>
6889                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6890                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6891                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6892                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6893                 </links>
6894                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6895                         <actions>
6896                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6897                         </actions>
6898                 </permacrud>
6899         </class>
6900         <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">
6901                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6902                         <field name="balance_owed" reporter:datatype="money" />
6903                         <field name="total_owed" reporter:datatype="money" />
6904                         <field name="total_paid" reporter:datatype="money" />
6905                         <field name="usr" reporter:datatype="link"/>
6906                 </fields>
6907                 <links>
6908                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6909                 </links>
6910         </class>
6911         <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">
6912                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6913                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6914                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6915                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6916                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6917                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6918                 </fields>
6919                 <links>
6920                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6921                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6922                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6923                 </links>
6924         </class>
6925         <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">
6926                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6927                         <field name="field" reporter:datatype="link"/>
6928                         <field name="id" reporter:datatype="id" />
6929                         <field name="source" reporter:datatype="link"/>
6930                         <field name="value" reporter:datatype="text"/>
6931                 </fields>
6932                 <links>
6933                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6934                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6935                 </links>
6936         </class>
6937         <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">
6938                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6939                         <field name="field" reporter:datatype="link"/>
6940                         <field name="id" reporter:datatype="id" />
6941                         <field name="source" reporter:datatype="link"/>
6942                         <field name="value" reporter:datatype="text"/>
6943                 </fields>
6944                 <links>
6945                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6946                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6947                 </links>
6948         </class>
6949         <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">
6950                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6951                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6952                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6953                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6954                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6955                 </fields>
6956                 <links>
6957                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6958                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6959                 </links>
6960         </class>
6961         <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">
6962                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6963                         <field name="depth" reporter:datatype="int" />
6964                         <field name="grantable" reporter:datatype="bool"/>
6965                         <field name="grp" reporter:datatype="link"/>
6966                         <field name="id" reporter:datatype="id" />
6967                         <field name="perm" reporter:datatype="link"/>
6968                 </fields>
6969                 <links>
6970                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6971                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6972                 </links>
6973         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6974             <actions>
6975                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6976                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6977                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6978                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6979             </actions>
6980         </permacrud>
6981         </class>
6982         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6983                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6984                         <field name="items" oils_persist:virtual="true" />
6985                         <field name="btype" reporter:datatype="text"/>
6986                         <field name="id" reporter:datatype="id" />
6987                         <field name="name" reporter:datatype="text"/>
6988                         <field name="description" reporter:datatype="text"/>
6989                         <field name="owner" reporter:datatype="link"/>
6990                         <field name="pub" reporter:datatype="bool"/>
6991                         <field name="create_time" reporter:datatype="timestamp" />
6992                 </fields>
6993                 <links>
6994                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6995                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6996                 </links>
6997         </class>
6998         <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">
6999                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
7000                         <field name="id" reporter:datatype="id" />
7001                         <field name="bucket" reporter:datatype="link"/>
7002                         <field name="note" reporter:datatype="text" />
7003                 </fields>
7004                 <links>
7005                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
7006                 </links>
7007         </class>
7008         <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">
7009                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
7010                         <field name="id" reporter:datatype="int" />
7011                         <field name="usr" reporter:datatype="link"/>
7012                         <field name="work_ou" reporter:datatype="link"/>
7013                 </fields>
7014                 <links>
7015                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7016                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
7017                 </links>
7018         </class>
7019         <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">
7020                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
7021                         <field name="depth" reporter:datatype="int"/>
7022                         <field name="grantable" reporter:datatype="bool"/>
7023                         <field name="id" reporter:datatype="id" />
7024                         <field name="perm" reporter:datatype="link"/>
7025                         <field name="usr" reporter:datatype="link"/>
7026                 </fields>
7027                 <links>
7028                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7029                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7030                 </links>
7031         </class>
7032         <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">
7033                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7034                         <field name="object_id" reporter:datatype="text"/>
7035                         <field name="grantable" reporter:datatype="bool"/>
7036                         <field name="id" reporter:datatype="id" />
7037                         <field name="perm" reporter:datatype="link"/>
7038                         <field name="usr" reporter:datatype="link"/>
7039                         <field name="object_type" reporter:datatype="text"/>
7040                 </fields>
7041                 <links>
7042                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7043                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7044                 </links>
7045         </class>
7046         <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">
7047                 <fields oils_persist:primary="id" oils_persist:sequence="">
7048                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7049                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7050                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7051                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7052                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7053                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7054                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7055                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7056                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7057                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7058                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7059                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7061                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7063                 </fields>
7064                 <links>
7065                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7066                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7067                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7068                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7069                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7070                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7071                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7072                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7073                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7074                 </links>
7075         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7076             <actions>
7077                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7078                     <context link="xact" jump="usr" field="home_ou"/>
7079                 </retrieve>
7080                         </actions>
7081                 </permacrud>
7082         </class>
7083         <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">
7084                 <fields oils_persist:primary="id" oils_persist:sequence="">
7085                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7086                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7087                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7088                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7089                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7090                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7091                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7092                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7093                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7094                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7095                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7096                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7097                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7098                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7099                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7100                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7101                 </fields>
7102                 <links>
7103                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7104                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7105                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7106                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7107                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7108                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7109                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7110                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7111                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7112                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7113                 </links>
7114         </class>
7115         <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">
7116                 <fields oils_persist:primary="id" oils_persist:sequence="">
7117                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7118                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7119                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7120                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7121                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7122                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7123                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7124                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7125                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7126                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7127                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7128                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7129                 </fields>
7130                 <links>
7131                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7132                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7133                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7134                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7135                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7136                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7137                 </links>
7138         </class>
7139         <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">
7140                 <fields oils_persist:primary="id" oils_persist:sequence="">
7141                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7142                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7143                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7144                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7145                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7146                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7147                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7148                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7149                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7150                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7151                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7152                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7153                 </fields>
7154                 <links>
7155                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7156                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7157                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7158                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7159                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7160                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7161                 </links>
7162         </class>
7163         <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">
7164                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7165                         <field name="bucket" reporter:datatype="link"/>
7166                         <field name="id" reporter:datatype="id" />
7167                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7168                         <field name="create_time" reporter:datatype="timestamp" />
7169                         <field name="pos" reporter:datatype="int" />
7170                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7171                 </fields>
7172                 <links>
7173                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7174                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7175             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7176                 </links>
7177         </class>
7178         <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">
7179                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7180                         <field name="id" reporter:datatype="id" />
7181                         <field name="item" reporter:datatype="link"/>
7182                         <field name="note" reporter:datatype="text" />
7183                 </fields>
7184                 <links>
7185                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7186                 </links>
7187         </class>
7188         <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">
7189                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7190                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7191                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7192                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7193                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7194                 </fields>
7195                 <links>
7196                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7197                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7198                 </links>
7199                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7200                         <actions>
7201                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7202                         </actions>
7203                 </permacrud>
7204         </class>
7205     <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">
7206         <fields oils_persist:primary="field">
7207             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7208             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7209             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7210         </fields>
7211         <links/>
7212         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7213             <actions>
7214                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7215                 <retrieve />
7216                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7217                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7218             </actions>
7219         </permacrud>
7220     </class>
7221         <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">
7222                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7223                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7224                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7225                 </fields>
7226                 <links/>
7227         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7228             <actions>
7229                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7230                 <retrieve/>
7231                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7232                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7233             </actions>
7234         </permacrud>
7235         </class>
7236
7237
7238         <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">
7239                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7240                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7241                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7242                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7243                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7244                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7245                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7246                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7247                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7248                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7249                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7250                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7251                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7252                 </fields>
7253                 <links>
7254                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7255                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7256                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7257                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7258                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7259                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7260                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7261                 </links>
7262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7263             <actions>
7264                 <create permission="TRANSIT_COPY">
7265                     <context link="target_copy" field="owner"/>
7266                 </create>
7267                 <retrieve/>
7268                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7269                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7270             </actions>
7271         </permacrud>
7272         </class>
7273         <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">
7274                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7275                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7276                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7277                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7278                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7279                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7280                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7281                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7282                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7283                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7284                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7285                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7286                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7287                 </fields>
7288                 <links>
7289                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7290                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7291                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7292                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7293                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7294                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7295                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7296                 </links>
7297         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7298             <actions>
7299                 <create permission="TRANSIT_COPY" context_field="owner">
7300                     <context link="target_copy" field="circ_lib"/>
7301                 </create>
7302                 <retrieve/>
7303                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7304                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7305             </actions>
7306         </permacrud>
7307         </class>
7308         <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">
7309                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7310                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7311                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7312                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7313                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7314                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7315                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7316                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7317                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7318                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7319                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7320                         <field reporter:label="Adjustments" name="adjustments" oils_persist:virtual="true" reporter:datatype="link"/>
7321                 </fields>
7322                 <links>
7323                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7324                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7325                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7326                         <link field="adjustments" reltype="has_many" key="billing" map="" class="maa"/>
7327                 </links>
7328         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7329             <actions>
7330                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7331                     <context link="xact" jump="usr" field="home_ou"/>
7332                 </retrieve>
7333                         </actions>
7334                 </permacrud>
7335         </class>
7336         <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">
7337                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7338                         <field name="grp" />
7339                         <field name="id" reporter:datatype="id" />
7340                         <field name="usr" />
7341                 </fields>
7342                 <links>
7343                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7344                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7345                 </links>
7346         </class>
7347         <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">
7348                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7349                         <field name="id" reporter:datatype="id" />
7350                         <field name="fq_field" reporter:datatype="text"/>
7351                         <field name="identity_value" reporter:datatype="text"/>
7352                         <field name="translation" reporter:datatype="text"/>
7353                         <field name="string" reporter:datatype="text"/>
7354                 </fields>
7355                 <links>
7356                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7357                 </links>
7358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7359             <actions>
7360                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7361                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7362                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7363                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7364             </actions>
7365         </permacrud>
7366         </class>
7367         <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">
7368                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7369                         <field name="id" reporter:datatype="id" />
7370                         <field name="fm_class" reporter:datatype="text"/>
7371                         <field name="field" reporter:datatype="text"/>
7372                         <field name="owner" reporter:datatype="org_unit"/>
7373                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7374                 </fields>
7375                 <links>
7376                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7377                 </links>
7378         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7379             <actions>
7380                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7381                 <retrieve/>
7382                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7383                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7384             </actions>
7385         </permacrud>
7386         </class>
7387         <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">
7388                 <fields oils_persist:primary="code">
7389                         <field name="code" reporter:datatype="id" />
7390                         <field name="marc_code" reporter:datatype="text"/>
7391                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7392                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7393                 </fields>
7394                 <links/>
7395         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7396             <actions>
7397                 <create permission="CREATE_LOCALE" global_required="true"/>
7398                 <retrieve/>
7399                 <update permission="UPDATE_LOCALE" global_required="true"/>
7400                 <delete permission="DELETE_LOCALE" global_required="true"/>
7401             </actions>
7402         </permacrud>
7403         </class>
7404         <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">
7405                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7406                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7407                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7408                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7409             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7410                 </fields>
7411                 <links>
7412                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7413                 </links>
7414         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7415             <actions>
7416                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7417                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7418                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7419                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7420             </actions>
7421         </permacrud>
7422         </class>
7423
7424         <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">
7425                 <fields oils_persist:primary="id">
7426                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7427                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7428                 </fields>
7429                 <links/>
7430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7431             <actions>
7432                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7433                 <retrieve/>
7434                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7435                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7436             </actions>
7437         </permacrud>
7438         </class>
7439
7440         <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">
7441                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7442                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7443                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7444                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7445                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7446                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7447                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7448                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7449                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7450                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7451                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7452                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7453                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7454                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7455                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7456                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7457                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7458                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7459                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7460                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7461                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7462                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7463                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7464                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7465                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7466                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7467                 </fields>
7468                 <links>
7469                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7470                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7471                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7472                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7473                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7474                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7475                 </links>
7476         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7477             <actions>
7478                 <create permission="user_request.create">
7479                     <context link="usr" field="home_ou"/>
7480                                 </create>
7481                 <retrieve permission="user_request.view">
7482                     <context link="usr" field="home_ou"/>
7483                                 </retrieve>
7484                 <update permission="user_request.update">
7485                     <context link="usr" field="home_ou"/>
7486                                 </update>
7487                 <delete permission="user_request.delete">
7488                     <context link="usr" field="home_ou"/>
7489                                 </delete>
7490             </actions>
7491         </permacrud>
7492         </class>
7493
7494         <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">
7495                 <fields oils_persist:primary="code">
7496                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7497                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7498                 </fields>
7499                 <links/>
7500         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7501             <actions>
7502                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7503                 <retrieve/>
7504                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7505                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7506             </actions>
7507         </permacrud>
7508         </class>
7509
7510         <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">
7511                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7512                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7513                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7514                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7515                         <field reporter:label="Ratio" name="ratio" />
7516                 </fields>
7517                 <links>
7518                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7519                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
7520                 </links>
7521                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7522                         <actions>
7523                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7524                                 <retrieve/>
7525                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7526                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7527                         </actions>
7528                 </permacrud>
7529         </class>
7530
7531         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7532                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7533                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7534                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7535                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7536                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7537                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7538                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7539                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7540                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7541                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7542                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7543                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7544                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7545                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7546                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7547                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7548                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7549                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7550                 </fields>
7551                 <links>
7552                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7553                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7554             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7555             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7556             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7557                 </links>
7558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7559             <actions>
7560                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7561                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7562                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7563                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7564             </actions>
7565         </permacrud>
7566         </class>
7567
7568         <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">
7569                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7570                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7571                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7572                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7573                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7574                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7575                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7576                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7577                 </fields>
7578                 <links>
7579                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7580                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7581                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7582                 </links>
7583         </class>
7584
7585         <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">
7586                 <fields oils_persist:primary="code">
7587                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7588                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7589                 </fields>
7590                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7591             <actions>
7592                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7593                 <retrieve/>
7594                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7595                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7596             </actions>
7597                 </permacrud>
7598         </class>
7599
7600         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7601                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7602                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7603                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7604                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7605                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7606                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7607                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7608                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7609                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7610                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7611                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7612                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7613                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7614                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7615                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7616                 </fields>
7617                 <links>
7618                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7619                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7620                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7621                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7622                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7623                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7624                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7625                 </links>
7626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7627             <actions>
7628                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7629                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7630                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7631                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7632             </actions>
7633         </permacrud>
7634         </class>
7635
7636         <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">
7637                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7638                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7639                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7640                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7641                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7642                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7643                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7644                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7645                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7646                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7647                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7648                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7649                 </fields>
7650                 <links>
7651                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7652                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7653                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7654                 </links>
7655         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7656             <actions>
7657                 <create   permission="ADMIN_INVOICE">
7658                                         <context link="invoice" field="receiver"/>
7659                                 </create>
7660                 <retrieve permission="ADMIN_INVOICE">
7661                                         <context link="invoice" field="receiver"/>
7662                                 </retrieve>
7663                 <update   permission="ADMIN_INVOICE">
7664                                         <context link="invoice" field="receiver"/>
7665                                 </update>
7666                                 <delete   permission="ADMIN_INVOICE">
7667                                         <context link="invoice" field="receiver"/>
7668                                 </delete>
7669             </actions>
7670         </permacrud>
7671         </class>
7672
7673         <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">
7674                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7675                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7676                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7677                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7678                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7679                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7680                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7681                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7682                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7683                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7684                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7685                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7686                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7687                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7688                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7689                 </fields>
7690                 <links>
7691                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7692                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7693                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7694                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7695                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7696                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7697                 </links>
7698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7699             <actions>
7700                 <create   permission="ADMIN_INVOICE">
7701                                         <context link="invoice" field="receiver"/>
7702                                 </create>
7703                 <retrieve permission="ADMIN_INVOICE">
7704                                         <context link="invoice" field="receiver"/>
7705                                 </retrieve>
7706                 <update   permission="ADMIN_INVOICE">
7707                                         <context link="invoice" field="receiver"/>
7708                                 </update>
7709                                 <delete   permission="ADMIN_INVOICE">
7710                                         <context link="invoice" field="receiver"/>
7711                                 </delete>
7712             </actions>
7713         </permacrud>
7714         </class>
7715
7716         <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">
7717                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7718                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7719                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7720                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7721                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7722                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7723                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7724                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7725                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7726                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7727                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7728                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7729                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7730                 </fields>
7731                 <links>
7732                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7733                 </links>
7734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7735             <actions>
7736                 <create permission="ADMIN_PROVIDER">
7737                     <context link="provider" field="owner"/>
7738                 </create>
7739                 <retrieve permission="ADMIN_PROVIDER">
7740                     <context link="provider" field="owner"/>
7741                 </retrieve>
7742                 <update permission="ADMIN_PROVIDER">
7743                     <context link="provider" field="owner"/>
7744                 </update>
7745                 <delete permission="ADMIN_PROVIDER">
7746                     <context link="provider" field="owner"/>
7747                 </delete>
7748             </actions>
7749         </permacrud>
7750         </class>
7751
7752         <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">
7753                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7754                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7755                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7756                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7757                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7758                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7759                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7760         </fields>
7761                 <links>
7762                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7763                 </links>
7764         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7765             <actions>
7766                 <create permission="ADMIN_PROVIDER">
7767                     <context link="provider" field="owner"/>
7768                 </create>
7769                 <retrieve permission="ADMIN_PROVIDER">
7770                     <context link="provider" field="owner"/>
7771                 </retrieve>
7772                 <update permission="ADMIN_PROVIDER">
7773                     <context link="provider" field="owner"/>
7774                 </update>
7775                 <delete permission="ADMIN_PROVIDER">
7776                     <context link="provider" field="owner"/>
7777                 </delete>
7778             </actions>
7779         </permacrud>
7780     </class>
7781         <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">
7782                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7783                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7784                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7785                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7786                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7787                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7788                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7789                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7790                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7791                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7792                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7793                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7794                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7795                 </fields>
7796                 <links>
7797                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7798                 </links>
7799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7800             <actions>
7801                 <create permission="ADMIN_PROVIDER">
7802                     <context link="contact" jump='provider' field="owner"/>
7803                 </create>
7804                 <retrieve permission="ADMIN_PROVIDER">
7805                     <context link="contact" jump='provider' field="owner"/>
7806                 </retrieve>
7807                 <update permission="ADMIN_PROVIDER">
7808                     <context link="contact" jump='provider' field="owner"/>
7809                 </update>
7810                 <delete permission="ADMIN_PROVIDER">
7811                     <context link="contact" jump='provider' field="owner"/>
7812                 </delete>
7813             </actions>
7814         </permacrud>
7815         </class>
7816
7817         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7818                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7819                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7820                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7821                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7822                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7823                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7824                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7825                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7826                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7827                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7828                 </fields>
7829                 <links>
7830                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7831                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7832                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7833                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7834                 </links>
7835         </class>
7836
7837         <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">
7838                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7839                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7840                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7841                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7842                 </fields>
7843                 <links>
7844             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7845                 </links>
7846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7847                         <actions>
7848                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7849                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7850                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7851                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7852                         </actions>
7853                 </permacrud>
7854         </class>
7855
7856         <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">
7857                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7858                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7859                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7860                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7861                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7862                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7863                 </fields>
7864                 <links>
7865                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7866                 </links>
7867                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7868                         <actions>
7869                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7870                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7871                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7872                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7873                         </actions>
7874                 </permacrud>
7875         </class>
7876
7877         <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">
7878                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7879                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7880                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7881                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7882                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7883                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7884                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7885                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7886                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7887                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7888                 </fields>
7889                 <links>
7890                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7891                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7892             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7893             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7894                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7895                 </links>
7896         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7897             <actions>
7898                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7899                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7900                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7901                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7902             </actions>
7903         </permacrud>
7904         </class>
7905
7906         <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">
7907                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7908                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7909                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7910                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7911                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7912                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7913                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7914                 </fields>
7915                 <links>
7916                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7917                 </links>
7918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7919                         <actions>
7920                                 <create permission="ADMIN_FUNDING_SOURCE">
7921                     <context link="funding_source" field="owner"/>
7922                 </create>
7923                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7924                     <context link="funding_source" field="owner"/>
7925                 </retrieve>
7926                                 <update permission="ADMIN_FUNDING_SOURCE">
7927                     <context link="funding_source" field="owner"/>
7928                 </update>
7929                                 <delete permission="ADMIN_FUNDING_SOURCE">
7930                     <context link="funding_source" field="owner"/>
7931                 </delete>
7932                         </actions>
7933                 </permacrud>
7934         </class>
7935
7936         <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">
7937                 <fields oils_persist:primary="id">
7938                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7939                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7940                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7941                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7942                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7943                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7944                 </fields>
7945                 <links>
7946                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7947                 </links>
7948         </class>
7949
7950         <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">
7951                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7952                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7953                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7954                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7955                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7956                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7957                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7958                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7959                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7960                         <field reporter:label="Invoice Entry" name="invoice_entry" reporter:datatype="link" />
7961                 </fields>
7962                 <links>
7963                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7964                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7965                         <link field="invoice_entry" reltype="has_a" key="id" map="" class="acqie"/>
7966                 </links>
7967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7968                         <actions>
7969                                 <create permission="ADMIN_ACQ_FUND">
7970                     <context link="fund" field="org"/>
7971                 </create>
7972                                 <retrieve permission="ADMIN_ACQ_FUND">
7973                     <context link="fund" field="org"/>
7974                 </retrieve>
7975                                 <update permission="ADMIN_ACQ_FUND">
7976                     <context link="fund" field="org"/>
7977                 </update>
7978                                 <delete permission="ADMIN_ACQ_FUND">
7979                     <context link="fund" field="org"/>
7980                 </delete>
7981                         </actions>
7982                 </permacrud>
7983         </class>
7984
7985         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7986                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7987                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7988                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7989                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7990                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7991                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7992                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7993                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7994                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7995                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7996                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7997                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7998                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7999                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
8000                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
8001                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
8002                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
8003                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
8004                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
8005                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
8006                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8007                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
8008                 </fields>
8009                 <links>
8010                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8011                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8012             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
8013             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
8014             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
8015             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
8016             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
8017             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
8018             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
8019             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
8020             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
8021                 </links>
8022         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
8023             <actions>
8024                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
8025                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8026                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
8027                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
8028             </actions>
8029         </permacrud>
8030         </class>
8031
8032         <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">
8033                 <fields oils_persist:primary="fund">
8034                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8035                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8036                 </fields>
8037                 <links>
8038                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8039                 </links>
8040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8041             <actions>
8042                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8043                                         <context link="fund" field="org" />
8044                 </retrieve>
8045             </actions>
8046         </permacrud>
8047         </class>
8048
8049         <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">
8050                 <fields oils_persist:primary="fund">
8051                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8052                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8053                 </fields>
8054                 <links>
8055                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8056                 </links>
8057         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8058             <actions>
8059                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8060                                         <context link="fund" field="org" />
8061                 </retrieve>
8062             </actions>
8063         </permacrud>
8064         </class>
8065
8066         <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">
8067                 <fields oils_persist:primary="fund">
8068                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8069                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8070                 </fields>
8071                 <links>
8072                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8073                 </links>
8074         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8075             <actions>
8076                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8077                                         <context link="fund" field="org" />
8078                 </retrieve>
8079             </actions>
8080         </permacrud>
8081         </class>
8082
8083         <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">
8084                 <fields oils_persist:primary="fund">
8085                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8086                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8087                 </fields>
8088                 <links>
8089                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8090                 </links>
8091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8092             <actions>
8093                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8094                                         <context link="fund" field="org" />
8095                 </retrieve>
8096             </actions>
8097         </permacrud>
8098         </class>
8099
8100         <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">
8101                 <fields oils_persist:primary="fund">
8102                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8103                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8104                 </fields>
8105                 <links>
8106                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8107                 </links>
8108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8109             <actions>
8110                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8111                                         <context link="fund" field="org" />
8112                 </retrieve>
8113             </actions>
8114         </permacrud>
8115         </class>
8116
8117    <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">
8118         <fields oils_persist:primary="fund">
8119             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8120             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8121         </fields>
8122         <links>
8123             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8124         </links>
8125     </class>
8126
8127    <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">
8128         <fields oils_persist:primary="fund">
8129             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8130             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8131         </fields>
8132         <links>
8133             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8134         </links>
8135     </class>
8136
8137    <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">
8138         <fields oils_persist:primary="fund">
8139             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8140             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8141         </fields>
8142         <links>
8143             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8144         </links>
8145     </class>
8146
8147    <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">
8148         <fields oils_persist:primary="fund">
8149             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8150             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8151         </fields>
8152         <links>
8153             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8154         </links>
8155     </class>
8156
8157    <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">
8158         <fields oils_persist:primary="fund">
8159             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8160             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8161         </fields>
8162         <links>
8163             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8164         </links>
8165     </class>
8166
8167         <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">
8168                 <fields oils_persist:primary="funding_source">
8169                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8170                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8171                 </fields>
8172                 <links>
8173                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8174                 </links>
8175         </class>
8176
8177         <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">
8178                 <fields oils_persist:primary="funding_source">
8179                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8180                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8181                 </fields>
8182                 <links>
8183                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8184                 </links>
8185         </class>
8186
8187         <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">
8188                 <fields oils_persist:primary="funding_source">
8189                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8190                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8191                 </fields>
8192                 <links>
8193                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8194                 </links>
8195         </class>
8196
8197         <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">
8198                 <fields oils_persist:primary="fund">
8199                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8200                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8201                 </fields>
8202                 <links>
8203                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8204                 </links>
8205         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8206             <actions>
8207                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8208                                         <context link="fund" field="org" />
8209                 </retrieve>
8210             </actions>
8211         </permacrud>
8212     </class>
8213     <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">
8214         <oils_persist:source_definition><![CDATA[
8215             SELECT
8216                 acqf.*,
8217                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8218                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8219                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8220                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8221             FROM
8222                 acq.fund acqf
8223                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8224                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8225                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8226                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8227         ]]></oils_persist:source_definition>
8228         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8229             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8230             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8231             <field reporter:label="Name" name="name" reporter:datatype="text" />
8232             <field reporter:label="Year" name="year" reporter:datatype="int" />
8233             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8234             <field reporter:label="Code" name="code" reporter:datatype="text" />
8235             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8236             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8237             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8238             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8239             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8240
8241             <!-- non fund-native fields -->
8242             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8243             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8244             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8245             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8246         </fields>
8247         <links>
8248             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8249             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8250             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8251         </links>
8252         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8253             <actions>
8254                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8255             </actions>
8256         </permacrud>
8257         </class>
8258         <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">
8259                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8260                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8261                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8262                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8263                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8264                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8265                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8266                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8267                 </fields>
8268                 <links>
8269                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8270                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8271                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8272                 </links>
8273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8274                         <actions>
8275                                 <create permission="ADMIN_ACQ_FUND">
8276                     <context link="fund" field="org"/>
8277                 </create>
8278                                 <retrieve permission="ADMIN_ACQ_FUND">
8279                     <context link="fund" field="org"/>
8280                 </retrieve>
8281                                 <update permission="ADMIN_ACQ_FUND">
8282                     <context link="fund" field="org"/>
8283                 </update>
8284                                 <delete permission="ADMIN_ACQ_FUND">
8285                     <context link="fund" field="org"/>
8286                 </delete>
8287                         </actions>
8288                 </permacrud>
8289         </class>
8290
8291     <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">
8292         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8293             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8294             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8295             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8296             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8297             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8298             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8299             <field reporter:label="Note" name="note" reporter:datatype="text" />
8300             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8301         </fields>
8302         <links>
8303             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8304             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8305             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8306         </links>
8307                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8308                         <actions>
8309                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8310                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8311                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8312                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8313                         </actions>
8314                 </permacrud>
8315     </class>
8316
8317         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8318                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8319                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8320                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8321                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8322                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8323                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8324                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8325                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8326                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8327                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8328                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8329                 </fields>
8330                 <links>
8331                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8332                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8333                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8334                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8335                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8336                 </links>
8337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8338                         <actions>
8339                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8340                         </actions>
8341                 </permacrud>
8342         </class>
8343
8344         <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">
8345                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8346                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8347                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8348                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8349                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8350                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8351                 </fields>
8352                 <links>
8353                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8354                 </links>
8355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8356                         <actions>
8357                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8358                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8359                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8360                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8361                         </actions>
8362                 </permacrud>
8363         </class>
8364
8365         <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">
8366                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8367                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8368                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8369                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8370                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8371                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8372                         <field reporter:label="State" name="state" reporter:datatype="text" />
8373                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8374                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8375                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8376                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8377                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8378                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8379                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8380                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8381                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8382                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8383                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8384                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8385                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8386                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8387                 </fields>
8388                 <links>
8389                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8390                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8391                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8392                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8393                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8394                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8395                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8396                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8397                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8398                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8399                 </links>
8400                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8401                         <actions>
8402                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8403                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8404                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8405                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8406                         </actions>
8407                 </permacrud>
8408         </class>
8409
8410         <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">
8411                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8412                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8413                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8414                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8415                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8416                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8417                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8418                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8419                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8420                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8421                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8422                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8423                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8424                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8425                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8426                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8427                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8428                 </fields>
8429                 <links>
8430                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8431                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8432                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8433                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8434                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8435                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8436                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8437                 </links>
8438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8439             <actions>
8440                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8441             </actions>
8442                 </permacrud>
8443         </class>
8444
8445         <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">
8446                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8447                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8448                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8449                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8450                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8451                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8452                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8453                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8454                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8455                 </fields>
8456                 <links>
8457                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8458                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8459                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8460                 </links>
8461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8462             <actions>
8463                 <create permission="CREATE_PURCHASE_ORDER">
8464                     <context link="purchase_order" field="ordering_agency"/>
8465                 </create>
8466                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8467                     <context link="purchase_order" field="ordering_agency"/>
8468                 </retrieve>
8469                 <update permission="CREATE_PURCHASE_ORDER">
8470                     <context link="purchase_order" field="ordering_agency"/>
8471                 </update>
8472                 <delete permission="CREATE_PURCHASE_ORDER">
8473                     <context link="purchase_order" field="ordering_agency"/>
8474                 </delete>
8475             </actions>
8476                 </permacrud>
8477         </class>
8478
8479         <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">
8480                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8481                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8482                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8483                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8484                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8485                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8486                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8487                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8488                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8489                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8490                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8491                 </fields>
8492                 <links>
8493                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8494                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8495                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8496                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8497                 </links>
8498                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8499             <actions>
8500                 <create permission="CREATE_PURCHASE_ORDER">
8501                     <context link="purchase_order" field="ordering_agency"/>
8502                 </create>
8503                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8504                     <context link="purchase_order" field="ordering_agency"/>
8505                 </retrieve>
8506                 <update permission="CREATE_PURCHASE_ORDER">
8507                     <context link="purchase_order" field="ordering_agency"/>
8508                 </update>
8509                 <delete permission="CREATE_PURCHASE_ORDER">
8510                     <context link="purchase_order" field="ordering_agency"/>
8511                 </delete>
8512             </actions>
8513                 </permacrud>
8514         </class>
8515
8516         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8517                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8518                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8519                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8520                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8521                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8522                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8523                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8524                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8525                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8526                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8527                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8528                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8529                         <field reporter:label="State" name="state" reporter:datatype="text" />
8530                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8531                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8532                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8533                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8534                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8535                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8536                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8537                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8538                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8539                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8540                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8541                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8542                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8543                 </fields>
8544                 <links>
8545                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8546                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8547                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8548                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8549                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8550                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8551                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8552                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8553                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8554                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8555                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8556                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8557                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8558                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8559                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8560                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8561                 </links>
8562                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8563                         <actions>
8564                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8565                                         <context link="purchase_order" field="ordering_agency"/>
8566                                         <context link="picklist" field="org_unit"/>
8567                                 </retrieve>
8568                         </actions>
8569                 </permacrud>
8570         </class>
8571
8572         <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">
8573                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8574                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8575                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8576                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8577                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8578                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8579                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8580                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8581                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8582                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8583                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8584                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8585                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8586                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8587                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8588                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8589                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8590                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8591                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8592                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8593                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8594                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8595                 </fields>
8596                 <links>
8597                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8598                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8599                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8600                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8601                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8602                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8603                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8604                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8605                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8606                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8607                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8608                 </links>
8609                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8610                         <actions>
8611                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8612                                         <context link="purchase_order" field="ordering_agency"/>
8613                                         <context link="picklist" field="org_unit"/>
8614                                 </retrieve>
8615                         </actions>
8616                 </permacrud>
8617         </class>
8618
8619         <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">
8620                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8621                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8622                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8623                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8624                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8625                 </fields>
8626                 <links>
8627                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8628                 </links>
8629                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8630                         <actions>
8631                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8632                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8633                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8634                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8635                         </actions>
8636                 </permacrud>
8637         </class>
8638
8639         <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">
8640                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8641                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8642                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8643                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8644                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8645                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8646                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8647                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8648                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8649                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8650                 </fields>
8651                 <links>
8652                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8653                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8654                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8655                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8656                 </links>
8657         </class>
8658
8659         <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">
8660                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8661                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8662                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8663                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8664                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8665                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8666                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8667                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8668                 </fields>
8669                 <links>
8670                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8671                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8672                 </links>
8673         </class>
8674
8675         <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">
8676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8677                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8678                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8679                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8680                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8681                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8682                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8683                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8684                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8685                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8686                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8687                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8688                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8689                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8690                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8691                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8692                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8693                 </fields>
8694                 <links>
8695                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8696                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8697                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8698                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8699                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8700                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8701                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8702                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8703                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8704                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8705                 </links>
8706         </class>
8707
8708         <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">
8709                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8710                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8711                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8712                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8713                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8714                 </fields>
8715                 <links/>
8716                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8717                         <actions>
8718                                 <retrieve />
8719                         </actions>
8720                 </permacrud>
8721         </class>
8722
8723         <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">
8724                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8725                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8726                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8727                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8728                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8729                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8730             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8731                 </fields>
8732                 <links/>
8733         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8734             <actions>
8735                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8736                 <retrieve />
8737                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8738                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8739             </actions>
8740         </permacrud>
8741         </class>
8742
8743         <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">
8744                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8745                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8746                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8747                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8748                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8749                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8750                 </fields>
8751                 <links/>
8752         </class>
8753         <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">
8754                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8755                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8756                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8757                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8758                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8759                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8760                 </fields>
8761                 <links>
8762                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8763                 </links>
8764         </class>
8765
8766         <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">
8767             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8768                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8769                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8770                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8771                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8772                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8773                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8774         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8775
8776             </fields>
8777             <links>
8778                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8779             </links>
8780             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8781                 <actions>
8782                     <create permission="ADMIN_PROVIDER">
8783                         <context link="provider" field="owner"/>
8784                     </create>
8785                     <retrieve permission="ADMIN_PROVIDER">
8786                         <context link="provider" field="owner"/>
8787                     </retrieve>
8788                     <update permission="ADMIN_PROVIDER">
8789                         <context link="provider" field="owner"/>
8790                     </update>
8791                     <delete permission="ADMIN_PROVIDER">
8792                         <context link="provider" field="owner"/>
8793                     </delete>
8794                 </actions>
8795             </permacrud>
8796         </class>
8797         
8798         <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">
8799             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8800                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8801                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8802                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8803                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8804             </fields>
8805             <links>
8806                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8807             </links>
8808             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8809                 <actions>
8810                     <create permission="ADMIN_PROVIDER">
8811                         <context link="provider" field="owner"/>
8812                     </create>
8813                     <retrieve permission="ADMIN_PROVIDER">
8814                         <context link="provider" field="owner"/>
8815                     </retrieve>
8816                     <update permission="ADMIN_PROVIDER">
8817                         <context link="provider" field="owner"/>
8818                     </update>
8819                     <delete permission="ADMIN_PROVIDER">
8820                         <context link="provider" field="owner"/>
8821                     </delete>
8822                 </actions>
8823             </permacrud>
8824         </class>
8825         
8826         <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">
8827             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8828                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8829                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8830                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8831                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8832                 </fields>
8833                 <links/>
8834         </class>
8835
8836         <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">
8837                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8838                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8839                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8840                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8841                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8842                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8843                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8844                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8845                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8846                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8847                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8848                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8849                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8850                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8851                 </fields>
8852                 <links>
8853                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8854                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8855                 </links>
8856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8857             <actions>
8858                 <create permission="ADMIN_PROVIDER">
8859                     <context link="provider" field="owner"/>
8860                 </create>
8861                 <retrieve permission="ADMIN_PROVIDER">
8862                     <context link="provider" field="owner"/>
8863                 </retrieve>
8864                 <update permission="ADMIN_PROVIDER">
8865                     <context link="provider" field="owner"/>
8866                 </update>
8867                 <delete permission="ADMIN_PROVIDER">
8868                     <context link="provider" field="owner"/>
8869                 </delete>
8870             </actions>
8871         </permacrud>
8872         </class>
8873
8874         <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">
8875                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8876                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8877                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8878                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8879                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8880                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8881                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8882                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8883                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8884                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8885                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8886                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8887                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8888                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8889                 </fields>
8890                 <links>
8891                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8892                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8893                 </links>
8894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8895             <actions>
8896                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8897                     <context link="account" jump="provider" field="owner"/>
8898                 </retrieve>
8899                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8900                     <context link="account" jump="provider" field="owner"/>
8901                 </update>
8902                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8903                     <context link="account" jump="provider" field="owner"/>
8904                 </delete>
8905             </actions>
8906         </permacrud>
8907         </class>
8908
8909
8910         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8911                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8912                         <field name="id" reporter:datatype="id" />
8913                         <field name="parent" reporter:datatype="link"/>
8914                         <field name="owner" reporter:datatype="link"/>
8915                         <field name="create_time" reporter:datatype="timestamp"/>
8916                         <field name="name" reporter:datatype="text"/>
8917                         <field name="shared" reporter:datatype="bool"/>
8918                         <field name="share_with" reporter:datatype="link"/>
8919                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8920                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8921                 </fields>
8922                 <links>
8923                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8924                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8925                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8926                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8927                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8928                 </links>
8929         </class>
8930         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8931                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8932                         <field name="id" reporter:datatype="id" />
8933                         <field name="parent" reporter:datatype="link"/>
8934                         <field name="owner" reporter:datatype="link"/>
8935                         <field name="create_time" reporter:datatype="timestamp"/>
8936                         <field name="name" reporter:datatype="text"/>
8937                         <field name="shared" reporter:datatype="bool"/>
8938                         <field name="share_with" reporter:datatype="link"/>
8939                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8940                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8941                 </fields>
8942                 <links>
8943                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8944                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8945                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8946                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8947                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8948                 </links>
8949         </class>
8950         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8951                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8952                         <field name="id" reporter:datatype="id" />
8953                         <field name="parent" reporter:datatype="link"/>
8954                         <field name="owner" reporter:datatype="link"/>
8955                         <field name="create_time" reporter:datatype="timestamp"/>
8956                         <field name="name" reporter:datatype="text"/>
8957                         <field name="shared" reporter:datatype="bool"/>
8958                         <field name="share_with" reporter:datatype="link"/>
8959                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8960                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8961                 </fields>
8962                 <links>
8963                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8964                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8965                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8966                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8967                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8968                 </links>
8969         </class>
8970         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8971                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8972                         <field name="id" reporter:datatype="id" />
8973                         <field name="owner" reporter:datatype="link"/>
8974                         <field name="create_time" reporter:datatype="timestamp"/>
8975                         <field name="name" reporter:datatype="text"/>
8976                         <field name="data" reporter:datatype="text"/>
8977                         <field name="folder" reporter:datatype="link"/>
8978                         <field name="description" reporter:datatype="text"/>
8979                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8980                 </fields>
8981                 <links>
8982                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8983                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8984                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8985                 </links>
8986         </class>
8987         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8988                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8989                         <field name="id" reporter:datatype="id" />
8990                         <field name="owner" reporter:datatype="link"/>
8991                         <field name="create_time" reporter:datatype="timestamp"/>
8992                         <field name="template" reporter:datatype="link"/>
8993                         <field name="data" reporter:datatype="text"/>
8994                         <field name="folder" reporter:datatype="link"/>
8995                         <field name="recur" reporter:datatype="bool"/>
8996                         <field name="recurrence" reporter:datatype="interval"/>
8997                         <field name="name" reporter:datatype="text"/>
8998                         <field name="description" reporter:datatype="text"/>
8999                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
9000                 </fields>
9001                 <links>
9002                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9003                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
9004                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
9005                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
9006                 </links>
9007         </class>
9008         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
9009                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
9010                         <field name="id" reporter:datatype="id" />
9011                         <field name="runner" reporter:datatype="link"/>
9012                         <field name="start_time" reporter:datatype="timestamp"/>
9013                         <field name="complete_time" reporter:datatype="timestamp"/>
9014                         <field name="run_time" reporter:datatype="timestamp"/>
9015                         <field name="email" reporter:datatype="text"/>
9016                         <field name="excel_format" reporter:datatype="bool"/>
9017                         <field name="csv_format" reporter:datatype="bool"/>
9018                         <field name="html_format" reporter:datatype="bool"/>
9019                         <field name="error_code" reporter:datatype="int"/>
9020                         <field name="error_text" reporter:datatype="text"/>
9021                         <field name="report" reporter:datatype="link"/>
9022                         <field name="folder" reporter:datatype="link"/>
9023                         <field name="chart_pie" reporter:datatype="bool"/>
9024                         <field name="chart_bar" reporter:datatype="bool"/>
9025                         <field name="chart_line" reporter:datatype="bool"/>
9026                 </fields>
9027                 <links>
9028                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
9029                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
9030                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
9031                 </links>
9032         </class>
9033         <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">
9034                 <fields oils_persist:primary="id">
9035                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9036                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9037                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9038                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9039                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9040                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9041                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9042                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9043                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9044                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9045                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9046                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9047                 </fields>
9048                 <links>
9049                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9050                 </links>
9051                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9052                         <actions>
9053                                 <retrieve />
9054                         </actions>
9055                 </permacrud>
9056         </class>
9057         <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">
9058                 <fields oils_persist:primary="id">
9059                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9060                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9061                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9062                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9063                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9064                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9065                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9066                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9067                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9068                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9069                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9070                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9071                 </fields>
9072                 <links>
9073                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9074                 </links>
9075         </class>
9076         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9077                 <fields oils_persist:primary="id">
9078                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9079                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9080                         <field reporter:label="Fingerprint" name="fingerprint" />
9081                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9082                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9083                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9084                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9085                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9086                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9087                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9088                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9089                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9090                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9091                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9092                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9093                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9094                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9095                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9096                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9097                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9098                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9099                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9100                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9101                 </fields>
9102                 <links>
9103                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9104                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9105                 </links>
9106         </class>
9107         <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">
9108                 <fields oils_persist:primary="id">
9109                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9110                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9111                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9112                 </fields>
9113                 <links>
9114                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9115                 </links>
9116         </class>
9117         <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">
9118                 <fields oils_persist:primary="id">
9119                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9120                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9121                 </fields>
9122                 <links>
9123                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9124                 </links>
9125         </class>
9126         <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">
9127                 <fields oils_persist:primary="id">
9128                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9129                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9130                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9131                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9132                 </fields>
9133                 <links>
9134                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9135                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9136                 </links>
9137         </class>
9138         <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">
9139                 <fields oils_persist:primary="xact">
9140                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9141                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9142                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9143                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9144                 </fields>
9145                 <links>
9146                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9147                 </links>
9148         </class>
9149         <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">
9150                 <fields oils_persist:primary="xact">
9151                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9152                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9153                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9154                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9155                 </fields>
9156                 <links>
9157                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9158                 </links>
9159         </class>
9160         <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)">
9161                 <fields oils_persist:primary="id">
9162                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9163                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9164                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9165                 </fields>
9166                 <links>
9167                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9168                 </links>
9169         </class>
9170         <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">
9171                 <fields oils_persist:primary="id">
9172                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9173                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9174                 </fields>
9175                 <links>
9176                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9177                 </links>
9178         </class>
9179         <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">
9180                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9181                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9182                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9183                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9184                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9185                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9186                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9187                 </fields>
9188                 <links>
9189                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9190                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9191                 </links>
9192                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9193                         <actions>
9194                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9195                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9196                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9197                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9198                         </actions>
9199                 </permacrud>
9200         </class>
9201         <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">
9202                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9203                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9204                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9205                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9206                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9207                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9208                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9209                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9210                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9211                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9212                 </fields>
9213                 <links>
9214                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9215                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9216                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9217                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9218                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9219                 </links>
9220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9221                         <actions>
9222                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9223                                         <context link="formula" field="owner"/>
9224                                 </create>
9225                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9226                                         <context link="formula" field="owner"/>
9227                                 </retrieve>
9228                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9229                                         <context link="formula" field="owner"/>
9230                                 </update>
9231                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9232                                         <context link="formula" field="owner"/>
9233                                 </delete>
9234                         </actions>
9235                 </permacrud>
9236         </class>
9237
9238         <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">
9239                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9240                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9241                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9242                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9243                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9244                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9245                 </fields>
9246                 <links>
9247                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9248                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9249                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9250                 </links>
9251                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9252                         <actions>
9253                                 <create permission="CREATE_PURCHASE_ORDER">
9254                                         <context link="formula" field="owner"/>
9255                 </create>
9256                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9257                                         <context link="formula" field="owner"/>
9258                 </retrieve>
9259                                 <update permission="CREATE_PURCHASE_ORDER">
9260                                         <context link="formula" field="owner"/>
9261                 </update>
9262                                 <delete permission="CREATE_PURCHASE_ORDER">
9263                                         <context link="formula" field="owner"/>
9264                 </delete>
9265                         </actions>
9266                 </permacrud>
9267         </class>
9268
9269         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9270                 <fields oils_persist:primary="id">
9271                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9272                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9273                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9274                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9275                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9276                 </fields>
9277                 <links>
9278                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9279                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9280                 </links>
9281         </class>
9282
9283         <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">
9284                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9285                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9286                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9287                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9288                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9289                 </fields>
9290                 <links>
9291                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9292                 </links>
9293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9294                         <actions>
9295                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9296                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9297                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9298                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9299                         </actions>
9300                 </permacrud>
9301         </class>
9302
9303         <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">
9304                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9305                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9306                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9307                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9308                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9309                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9310                 </fields>
9311                 <links>
9312                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9313                 </links>
9314                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9315                         <actions>
9316                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9317                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9318                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9319                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9320                         </actions>
9321                 </permacrud>
9322         </class>
9323
9324         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9325                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9326                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9327                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9328                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9329                 </fields>
9330                 <links>
9331                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9332                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9333                 </links>
9334         </class>
9335
9336         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9337                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9338                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9339                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9340                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9341                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9342                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9343                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9344                 </fields>
9345                 <links>
9346                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9347                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9348                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9349                 </links>
9350         </class>
9351
9352         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9353                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9354                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9355                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9356                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9357                 </fields>
9358                 <links>
9359                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9360                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9361                 </links>
9362         </class>
9363
9364         <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">
9365                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9366                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9367                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9368                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9369                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9370                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9371                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9372                 </fields>
9373                 <links>
9374                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9375                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9376                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9377                 </links>
9378         </class>
9379
9380         <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">
9381                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9382                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9383                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9384                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9385                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9386                 </fields>
9387                 <links>
9388                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9389                 </links>
9390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9391             <actions>
9392                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9393                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9394                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9395                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9396             </actions>
9397                 </permacrud>
9398         </class>
9399
9400         <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">
9401                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9402                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9403                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9404                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9405                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9406                 </fields>
9407                 <links>
9408                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9409                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9410                 </links>
9411                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9412                         <actions>
9413                                 <create permission="ADMIN_CLAIM_POLICY">
9414                                         <context link="claim_policy" field="org_unit"/>
9415                 </create>
9416                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9417                                         <context link="claim_policy" field="org_unit"/>
9418                 </retrieve>
9419                                 <update permission="ADMIN_CLAIM_POLICY">
9420                                         <context link="claim_policy" field="org_unit"/>
9421                 </update>
9422                                 <delete permission="ADMIN_CLAIM_POLICY">
9423                                         <context link="claim_policy" field="org_unit"/>
9424                 </delete>
9425                         </actions>
9426                 </permacrud>
9427         </class>
9428
9429     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9430         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9431             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9432             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9433             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9434             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9435             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9436             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9437             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9438             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9439             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9440             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9441             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9442             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9443             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9444             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9445             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9446             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9447         </fields>
9448         <links>
9449             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9450         </links>
9451     </class>
9452
9453     <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">
9454         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9455             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9456             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9457             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9458             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9459             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9460         </fields>
9461     </class>
9462
9463     <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">
9464         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9465             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9466             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9467             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9468             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9469             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9470             <field reporter:label="City" name="city" reporter:datatype="text"/>
9471             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9472             <field reporter:label="State" name="state" reporter:datatype="text"/>
9473             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9474             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9475             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9476         </fields>
9477     </class>
9478
9479     <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">
9480         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9481             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9482             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9483             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9484             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9485             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9486             <field reporter:label="City" name="city" reporter:datatype="text"/>
9487             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9488             <field reporter:label="State" name="state" reporter:datatype="text"/>
9489             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9490             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9491             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9492         </fields>
9493     </class>
9494
9495     <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">
9496         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9497             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9498             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9499             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9500             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9501             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9502             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9503         </fields>
9504     </class>
9505
9506         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9507                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9508                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9509                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9510                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9511                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9512                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9513                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9514                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9515                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9516                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9517                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9518                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9519                 </fields>
9520                 <links>
9521                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9522                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9523                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9524                 </links>
9525         </class>
9526
9527         <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">
9528                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9529                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9530                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9531                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9532                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9533                 </fields>
9534                 <links>
9535                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9536                 </links>
9537         </class>
9538
9539     <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">
9540         <fields>
9541             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9542             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9543             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9544         </fields>
9545                 <links>
9546                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9547                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9548                 </links>
9549     </class>
9550
9551     <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">
9552         <fields>
9553             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9554             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9555         </fields>
9556                 <links>
9557                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9558                 </links>
9559     </class>
9560
9561     <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">
9562         <fields>
9563             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9564             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9565             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9566         </fields>
9567                 <links>
9568                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9569                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9570                 </links>
9571     </class>
9572
9573     <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">
9574         <fields>
9575             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9576             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9577         </fields>
9578                 <links>
9579                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9580                 </links>
9581     </class>
9582
9583     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9584                 <oils_persist:source_definition>
9585
9586             SELECT  DISTINCT l.*
9587               FROM  action.unfulfilled_hold_loops l
9588                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9589               WHERE l.count = m.max
9590
9591                 </oils_persist:source_definition>
9592         <fields>
9593             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9594             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9595             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9596         </fields>
9597                 <links>
9598                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9599                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9600                 </links>
9601     </class>
9602
9603         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9604                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9605                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9606                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9607                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9608                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9609                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9610                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9611                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9612                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9613                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9614                 </fields>
9615                 <links>
9616                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9617                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9618                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9619                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9620                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9621                 </links>
9622         </class>
9623
9624         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9625                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9626                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9627                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9628                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9629                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9630                 </fields>
9631                 <links>
9632                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9633                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9634                 </links>
9635         </class>
9636
9637         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9638                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9639                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9640                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9641                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9642                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9643                 </fields>
9644                 <links>
9645                 </links>
9646         </class>
9647
9648         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9649                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9650                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9651                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9652                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9653                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9654                 </fields>
9655                 <links>
9656                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9657                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9658                 </links>
9659         </class>
9660         
9661         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9662                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9663                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9664                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9665                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9666                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9667                 </fields>
9668                 <links>
9669                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9670                 </links>
9671         </class>
9672         
9673         <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">
9674                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9675                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9676                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9677                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9678                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9679                 </fields>
9680                 <links>
9681                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9682                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9683                 </links>
9684         </class>
9685
9686         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9687                 <fields oils_persist:primary="name">
9688                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9689                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9690                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9691                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9692                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9693                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9694                 </fields>
9695                 <links>
9696                 </links>
9697         </class>
9698
9699         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9700                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9701                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9702                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9703                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9704                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9705                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9706                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9707                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9708                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9709                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9710                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9711                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9712                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9713                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9714                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9715                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9716                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9717                 </fields>
9718                 <links>
9719                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9720                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9721                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9722                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9723                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9724                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9725                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9726                 </links>
9727         </class>
9728
9729         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9730                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9731                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9732                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9733                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9734                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9735                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9736                 </fields>
9737                 <links>
9738                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9739                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9740                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9741                 </links>
9742         </class>
9743
9744         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9745                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9746                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9747                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9748                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9749                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9750                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9751                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9752                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9753                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9754                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9755                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9756                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9757                 </fields>
9758                 <links>
9759                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9760                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9761                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9762                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9763                 </links>
9764         </class>
9765
9766         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9767                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9768                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9769                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9770                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9771                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9772                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9773                 </fields>
9774                 <links>
9775                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9776                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9777                 </links>
9778         </class>
9779
9780         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9781                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9782                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9783                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9784                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9785                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9786                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9787                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9788                 </fields>
9789                 <links>
9790                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9791                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9792                 </links>
9793         </class>
9794
9795         <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">
9796                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9797                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9798                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9799                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9800                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9801                 </fields>
9802                 <links>
9803                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9804                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9805                 </links>
9806         </class>
9807
9808         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9809                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9810                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9811                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9812                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9813                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9814                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9815                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9816                 </fields>
9817                 <links>
9818                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9819                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9820                 </links>
9821         </class>
9822
9823         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9824                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9825                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9826                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9827                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9828                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9829                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9830                 </fields>
9831                 <links>
9832                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9833                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9834                 </links>
9835         </class>
9836
9837         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9838                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9839                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9840                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9841                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9842                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9843                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9844                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9845                 </fields>
9846                 <links>
9847                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9848                 </links>
9849         </class>
9850
9851         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9852                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9853                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9854                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9855                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9856                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9857                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9858                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9859                 </fields>
9860                 <links>
9861                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9862                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9863                 </links>
9864         </class>
9865
9866         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9867                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9868                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9869                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9870                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9871                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9872                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9873                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9874                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9875                 </fields>
9876                 <links>
9877                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9878                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9879                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9880                 </links>
9881         </class>
9882
9883         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9884                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9885                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9886                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9887                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9888                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9889                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9890                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9891                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9892                 </fields>
9893                 <links>
9894                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9895                 </links>
9896         </class>
9897
9898         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9899                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9900                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9901                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9902                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9903                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9904                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9905                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9906                 </fields>
9907                 <links>
9908                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9909                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9910                 </links>
9911         </class>
9912
9913         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9914                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9915                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9916                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9917                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9918                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9919                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9920                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9921                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9922                 </fields>
9923                 <links>
9924                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9925                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9926                 </links>
9927         </class>
9928
9929         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9930                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9931                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9932                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9933                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9934                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9935                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9936                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9937                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9938                 </fields>
9939                 <links>
9940                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9941                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9942                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9943                 </links>
9944         </class>
9945
9946         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9947                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9948                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9949                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9950                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9951                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9952                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9953                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9954                 </fields>
9955                 <links>
9956                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9957                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9958                 </links>
9959         </class>
9960
9961         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9962                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9963                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9964                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9965                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9966                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9967                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9968                 </fields>
9969                 <links>
9970                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9971                 </links>
9972         </class>
9973
9974         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9975                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9976                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9977                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9978                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9979                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9980                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9981                 </fields>
9982                 <links>
9983                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9984                 </links>
9985         </class>
9986
9987         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9988                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9989                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9990                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9991                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9992                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9993                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9994                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9995                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9996                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9997                 </fields>
9998                 <links>
9999                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10000                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
10001                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
10002                 </links>
10003         </class>
10004
10005         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
10006                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10007                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10008                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10009                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10010                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10011                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
10012                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
10013                 </fields>
10014                 <links>
10015                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10016                 </links>
10017         </class>
10018
10019         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
10020                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10021                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10022                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10023                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10024                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10025                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
10026                 </fields>
10027                 <links>
10028                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10029                 </links>
10030         </class>
10031
10032         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
10033                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
10034                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
10035                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
10036                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
10037                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
10038                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
10039                 </fields>
10040                 <links>
10041                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
10042                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10043                 </links>
10044         </class>
10045
10046         <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">
10047                 <fields oils_persist:primary="id">
10048                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10049                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10050                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10051                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10052                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10053                 </fields>
10054                 <links>
10055                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10056                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10057                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10058                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10059                 </links>
10060         </class>
10061
10062         <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">
10063                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10064                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10065                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10066                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10067                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10068                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10069                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10070                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10071                 </fields>
10072                 <links/>
10073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10074                         <actions>
10075                                 <retrieve/>
10076                         </actions>
10077                 </permacrud>
10078         </class>
10079
10080         <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">
10081                 <fields oils_persist:primary="ptype_key">
10082                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10083                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10084                 </fields>
10085                 <links/>
10086                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10087                         <actions>
10088                                 <retrieve/>
10089                         </actions>
10090                 </permacrud>
10091         </class>
10092
10093         <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">
10094                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10095                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10096                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10097                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10098                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10099                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10100                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10101                 </fields>
10102                 <links>
10103                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10104                 </links>
10105                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10106                         <actions>
10107                                 <retrieve/>
10108                         </actions>
10109                 </permacrud>
10110         </class>
10111
10112         <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">
10113                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10114                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10115                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10116                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10117                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10118                 </fields>
10119                 <links>
10120                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10121                 </links>
10122                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10123                         <actions>
10124                                 <retrieve/>
10125                         </actions>
10126                 </permacrud>
10127         </class>
10128
10129     <class
10130         id="uvs"
10131         controller="open-ils.cstore open-ils.pcrud"
10132         oils_obj:fieldmapper="url_verify::session"
10133         oils_persist:tablename="url_verify.session"
10134         reporter:label="URL Verification Session"
10135     >
10136         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10137             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10138             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10139                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10140             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10141             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10142             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10143             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10144             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10145             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10146         </fields>
10147
10148         <links>
10149             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10150             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10151             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10152             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10153             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10154         </links>
10155
10156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10157             <actions>
10158                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10159             </actions>
10160         </permacrud>
10161
10162     </class>
10163
10164     <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">
10165         <oils_persist:source_definition>
10166             SELECT
10167                 cbrebi.id AS id,  -- so we can have a pkey in our view
10168                 uvs.id AS session,
10169                 uvs.owning_lib,
10170                 cbrebi.target_biblio_record_entry
10171             FROM url_verify.session uvs
10172             JOIN container.biblio_record_entry_bucket cbreb
10173                 ON (uvs.container = cbreb.id)
10174             JOIN container.biblio_record_entry_bucket_item cbrebi
10175                 ON (cbrebi.bucket = cbreb.id)
10176         </oils_persist:source_definition>
10177         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10178             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10179             <field reporter:label="Session" name="session" reporter:datatype="link" />
10180             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10181             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10182         </fields>
10183         <links>
10184             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10185             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10186             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10187         </links>
10188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10189             <actions>
10190                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10191             </actions>
10192         </permacrud>
10193     </class>
10194
10195     <class
10196         id="uvus"
10197         controller="open-ils.cstore open-ils.pcrud"
10198         oils_obj:fieldmapper="url_verify::url_selector"
10199         oils_persist:tablename="url_verify.url_selector"
10200         reporter:label="URL Verification URL Selector"
10201     >
10202         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10203             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10204             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10205                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10206             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10207         </fields>
10208
10209         <links>
10210             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10211             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10212         </links>
10213
10214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10215             <actions>
10216                 <create permission="URL_VERIFY">
10217                     <context link="session" field="owning_lib"/>
10218                 </create>
10219                 <retrieve permission="URL_VERIFY">
10220                     <context link="session" field="owning_lib"/>
10221                 </retrieve>
10222                 <update permission="URL_VERIFY">
10223                     <context link="session" field="owning_lib"/>
10224                 </update>
10225                 <delete permission="URL_VERIFY">
10226                     <context link="session" field="owning_lib"/>
10227                 </delete>
10228             </actions>
10229         </permacrud>
10230
10231     </class>
10232
10233     <class
10234         id="uvu"
10235         controller="open-ils.cstore open-ils.pcrud"
10236         oils_obj:fieldmapper="url_verify::url"
10237         oils_persist:tablename="url_verify.url"
10238         reporter:label="URL Verification URL"
10239     >
10240         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10241             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10242                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10243                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10244                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10245                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10246             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10247             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10248             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10249             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10250             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10251             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10252             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10253             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10254             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10255             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10256             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10257             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10258             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10259         </fields>
10260
10261         <links>
10262             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10263             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10264             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10265             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10266             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10267         </links>
10268
10269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10270             <actions>
10271                 <create permission="URL_VERIFY">
10272                     <context link="session" field="owning_lib"/>
10273                 </create>
10274                 <retrieve permission="URL_VERIFY">
10275                     <context link="session" field="owning_lib"/>
10276                 </retrieve>
10277                 <update permission="URL_VERIFY">
10278                     <context link="session" field="owning_lib"/>
10279                 </update>
10280                 <delete permission="URL_VERIFY">
10281                     <context link="session" field="owning_lib"/>
10282                 </delete>
10283             </actions>
10284         </permacrud>
10285
10286     </class>
10287
10288     <class
10289         id="uvva"
10290         controller="open-ils.cstore open-ils.pcrud"
10291         oils_obj:fieldmapper="url_verify::verification_attempt"
10292         oils_persist:tablename="url_verify.verification_attempt"
10293         reporter:label="URL Verification Attempt"
10294     >
10295         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10296             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10297                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10298                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10299             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10300             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10301         </fields>
10302
10303         <links>
10304             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10305             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10306         </links>
10307
10308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10309             <actions>
10310                 <create permission="URL_VERIFY">
10311                     <context link="session" field="owning_lib"/>
10312                 </create>
10313                 <retrieve permission="URL_VERIFY">
10314                     <context link="session" field="owning_lib"/>
10315                 </retrieve>
10316                 <update permission="URL_VERIFY">
10317                     <context link="session" field="owning_lib"/>
10318                 </update>
10319                 <delete permission="URL_VERIFY">
10320                     <context link="session" field="owning_lib"/>
10321                 </delete>
10322             </actions>
10323         </permacrud>
10324
10325     </class>
10326
10327     <class
10328         id="uvuv"
10329         controller="open-ils.cstore open-ils.pcrud"
10330         oils_obj:fieldmapper="url_verify::url_verification"
10331         oils_persist:tablename="url_verify.url_verification"
10332         reporter:label="URL Verification"
10333     >
10334         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10335             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10336                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10337                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10338             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10339             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10340             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10341             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10342                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10343         </fields>
10344
10345         <links>
10346             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10347             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10348             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10349         </links>
10350
10351         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10352             <actions>
10353                 <create permission="URL_VERIFY">
10354                     <context link="attempt" jump="session" field="owning_lib"/>
10355                 </create>
10356                 <retrieve permission="URL_VERIFY">
10357                     <context link="attempt" jump="session" field="owning_lib"/>
10358                 </retrieve>
10359                 <update permission="URL_VERIFY">
10360                     <context link="attempt" jump="session" field="owning_lib"/>
10361                 </update>
10362                 <delete permission="URL_VERIFY">
10363                     <context link="attempt" jump="session" field="owning_lib"/>
10364                 </delete>
10365             </actions>
10366         </permacrud>
10367
10368     </class>
10369
10370         <class
10371                 id="cfdi"
10372                 controller="open-ils.cstore open-ils.pcrud"
10373                 oils_obj:fieldmapper="config::filter_dialog_interface"
10374                 oils_persist:tablename="config.filter_dialog_interface"
10375                 reporter:label="FilterDialog Interface">
10376                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10377                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10378                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10379                 </fields>
10380                 <links>
10381                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10382                 </links>
10383                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10384                         <actions>
10385                                 <retrieve />
10386                         </actions>
10387                 </permacrud>
10388         </class>
10389
10390         <class
10391                 id="cfdfs"
10392                 controller="open-ils.cstore open-ils.pcrud"
10393                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10394                 oils_persist:tablename="config.filter_dialog_filter_set"
10395                 reporter:label="FilterDialog Filter Set">
10396                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10397                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10398                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10399                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10400                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10401                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10402                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10403                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10404                 </fields>
10405                 <links>
10406                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10407                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10408                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10409                 </links>
10410                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10411                         <actions>
10412                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10413                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10414                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10415                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10416                         </actions>
10417                 </permacrud>
10418
10419         </class>
10420
10421         <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">
10422                 <fields oils_persist:primary="code">
10423                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10424                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10425                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10426                 </fields>
10427                 <links/>
10428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10429                         <actions>
10430                                 <retrieve/>
10431                         </actions>
10432                 </permacrud>
10433         </class>
10434
10435         <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">
10436                 <oils_persist:source_definition>
10437
10438             SELECT  b.id,
10439                     MAX(dcp.edit_date) AS last_delete_date
10440              FROM   biblio.record_entry b
10441                     JOIN asset.call_number cn ON (cn.record = b.id)
10442                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10443              WHERE  NOT b.deleted
10444              GROUP BY b.id
10445              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10446
10447                 </oils_persist:source_definition>
10448                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10449                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10450                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10451                 </fields>
10452                 <links>
10453                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10454                 </links>
10455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10456                         <actions>
10457                                 <retrieve/>
10458                         </actions>
10459                 </permacrud>
10460         </class>
10461
10462         <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">
10463                 <oils_persist:source_definition>
10464
10465             -- -- 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.
10466             -- -- 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
10467             -- -- may not.
10468             -- SELECT
10469             --     bre.id AS "bib_id",
10470             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10471             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10472             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10473             -- FROM (
10474                 SELECT
10475                     y.bre AS "id",
10476                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10477                     y.hold_count AS "hold_count",
10478                     (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"
10479                 FROM (
10480                         SELECT
10481                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10482                             COUNT(*) AS "hold_count"
10483                         FROM action.hold_request h
10484                         WHERE
10485                             cancel_time IS NULL
10486                             AND fulfillment_time IS NULL
10487                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10488                         GROUP BY 1
10489                     )y LEFT JOIN (
10490                         SELECT 
10491                             (SELECT id
10492                                 FROM biblio.record_entry 
10493                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10494                             ) AS "bre", 
10495                             COUNT(*) AS "copy_count"
10496                         FROM asset.copy
10497                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10498                         WHERE copy.holdable 
10499                             AND NOT copy.deleted 
10500                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10501                         GROUP BY 1
10502                     )x ON x.bre = y.bre
10503                 -- )z RIGHT JOIN (
10504                 --     SELECT id
10505                 --     FROM biblio.record_entry
10506                 --     WHERE NOT deleted
10507                 -- )bre ON (z.bib_id = bre.id)
10508                 
10509
10510                 </oils_persist:source_definition>
10511                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10512                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10513                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10514                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10515                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10516                 </fields>
10517                 <links>
10518                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10519                 </links>
10520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10521                         <actions>
10522                                 <retrieve/>
10523                         </actions>
10524                 </permacrud>
10525         </class>
10526
10527         <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">
10528                 <oils_persist:source_definition>
10529             SELECT *,
10530                 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,
10531                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10532             FROM
10533                 (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
10534                     FROM
10535                         action.hold_request ahr
10536                         JOIN reporter.hold_request_record rhrr USING (id)
10537                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10538                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10539                     WHERE
10540                         ahr.cancel_time IS NULL
10541                         AND ahr.fulfillment_time IS NULL
10542                     GROUP BY bib_record, pickup_lib
10543                 )x
10544                 JOIN
10545                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10546                     FROM
10547                         action.hold_request ahr
10548                         JOIN reporter.hold_request_record rhrr USING (id)
10549                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10550                     WHERE
10551                         ahr.cancel_time IS NULL
10552                         AND ahr.fulfillment_time IS NULL
10553                     GROUP BY bib_record
10554                 )y
10555                 USING (id)
10556                 </oils_persist:source_definition>
10557                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10558                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10559                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10560                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10561                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10562                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10563                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10564                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10565                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10566                 </fields>
10567                 <links>
10568                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10569                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10570                 </links>
10571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10572                         <actions>
10573                                 <retrieve/>
10574                         </actions>
10575                 </permacrud>
10576         </class>
10577
10578         <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) ">
10579                 <oils_persist:source_definition>
10580             WITH counts_at_ou AS (
10581                 SELECT bib_record, pickup_lib, count(DISTINCT ahr.id) AS holds_at_pickup_library, 
10582                     COALESCE(count(DISTINCT ac.id),0) as copy_count_at_pickup_library
10583                 FROM action.hold_request ahr
10584                 JOIN reporter.hold_request_record rhrr USING (id)
10585                 LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10586                 LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10587                 WHERE ahr.cancel_time IS NULL
10588                 AND ahr.fulfillment_time IS NULL
10589                 GROUP BY bib_record, pickup_lib
10590             )
10591             SELECT *,
10592                 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,
10593                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10594             FROM
10595                 (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
10596                 FROM actor.org_unit aou
10597                 JOIN counts_at_ou cao ON (cao.pickup_lib IN (SELECT id FROM actor.org_unit_descendants(aou.id))) 
10598                 GROUP BY bib_record, pickup_lib_or_desc
10599                 )x
10600                 JOIN
10601                 (SELECT bib_record AS id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10602                     FROM
10603                         action.hold_request ahr
10604                         JOIN reporter.hold_request_record rhrr USING (id)
10605                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10606                     WHERE
10607                         ahr.cancel_time IS NULL
10608                         AND ahr.fulfillment_time IS NULL
10609                     GROUP BY bib_record
10610                 )y
10611                 USING (id)
10612                 </oils_persist:source_definition>
10613                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10614                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10615                         <field reporter:label="Pickup Library" name="pickup_lib_or_desc" reporter:datatype="org_unit"/>
10616                         <field reporter:label="Active Holds at Pickup Library and its Descendants" name="holds_at_or_below" reporter:datatype="int"/>
10617                         <field reporter:label="Holdable Copy Count at Pickup Library and its Descendants" name="copy_count_at_or_below" reporter:datatype="int"/>
10618                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10619                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10620                         <field reporter:label="Hold/Copy Ratio at Pickup Library and its Descendants" name="hold_copy_ratio_at_or_below_ou" reporter:datatype="float"/>
10621                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10622                 </fields>
10623                 <links>
10624                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10625                         <link field="pickup_lib_or_desc" reltype="has_a" key="id" map="" class="aou"/>
10626                 </links>
10627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10628                         <actions>
10629                                 <retrieve/>
10630                         </actions>
10631                 </permacrud>
10632         </class>
10633
10634         <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">
10635                 <oils_persist:source_definition>
10636             SELECT
10637                 ac.id,
10638                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10639                 MAX(actac.xact_start) AS last_circ
10640             FROM asset.copy ac
10641                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10642             GROUP BY ac.id
10643
10644             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10645             --SELECT
10646             --    ac.id,
10647             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10648             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10649             --FROM asset.copy ac
10650             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10651             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10652             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10653                 </oils_persist:source_definition>
10654                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10655                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10656                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10657                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10658                 </fields>
10659                 <links>
10660                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10661                 </links>
10662                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10663                         <actions>
10664                                 <retrieve/>
10665                         </actions>
10666                 </permacrud>
10667         </class>
10668
10669         <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">
10670                 <fields oils_persist:primary="id">
10671                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10672                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10673                 </fields>
10674                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10675                         <actions>
10676                                 <retrieve/>
10677                         </actions>
10678                 </permacrud>
10679         </class>
10680
10681         <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">
10682                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10683                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10684                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10685                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10686                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10687                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10688                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10689                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10690                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10691                 </fields>
10692                 <links>
10693                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10694                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10695                 </links>
10696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10697                         <actions>
10698                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10699                                 <retrieve/>
10700                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10701                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10702                         </actions>
10703                 </permacrud>
10704         </class>
10705
10706         <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">
10707                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10708                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10709                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10710                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10711                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10712                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10713                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10714                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10715                 </fields>
10716                 <links>
10717                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10718                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10719                 </links>
10720                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10721                         <actions>
10722                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10723                                 <retrieve/>
10724                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10725                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10726                         </actions>
10727                 </permacrud>
10728         </class>
10729
10730
10731         <!-- ********************************************************************************************************************* -->
10732         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10733         <!-- ********************************************************************************************************************* -->
10734         <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">
10735                 <fields oils_persist:primary="id">
10736                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10737                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10738                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10739                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10740                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10741                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10742                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10743                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10744                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10745                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10746                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10747                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10748                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10749                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10750                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10751                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10752                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10753                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10754                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10755                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10756                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10757                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10758                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10759                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10760                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10761                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10762                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10763                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10764                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10765                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10766                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10767                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10768                 </fields>
10769                 <links>
10770                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10771                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10772                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10773                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10774                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10775                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10776                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10777                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10778                 </links>
10779         </class>
10780
10781         <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">
10782                 <fields oils_persist:primary="id">
10783                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10784                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10785                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10786                 </fields>
10787                 <links>
10788                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10789                 </links>
10790         </class>
10791
10792         <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">
10793                 <fields oils_persist:primary="id">
10794                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10795                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10796                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10797                 </fields>
10798                 <links>
10799                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10800                 </links>
10801         </class>
10802
10803         <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">
10804                 <fields oils_persist:primary="id">
10805                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10806
10807                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10808                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10809                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10810
10811                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10812                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10813                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10814
10815                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10816                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10817
10818                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10819                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10820                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10821
10822                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10823                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10824
10825                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10826                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10827                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10828
10829                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10830                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10831                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10832
10833                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10834                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10835                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10836                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10837
10838                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10839                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10840
10841                 </fields>
10842                 <links>
10843                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10844                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10845                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10846                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10847                 </links>
10848         </class>
10849
10850         <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">
10851                 <oils_persist:source_definition>
10852
10853             SELECT
10854                 po.ordering_agency AS ordering_agency,
10855                 po.id AS purchase_order,
10856                 li.id AS lineitem,
10857                 lid.id AS lineitem_detail,
10858                 cpa.id AS claim_policy_action
10859             FROM
10860                 acq.lineitem_detail lid
10861                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10862                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10863                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10864                 JOIN acq.claim_policy_action cpa ON (
10865                     cpa.claim_policy = cp.id
10866
10867                     -- we only care about claim policy actions whose claim
10868                     -- interval we'd reached or exceeded
10869                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10870
10871                     -- filter out all claim policy actions where claim events
10872                     -- have occurred on or after the action's action_interval
10873                     AND NOT EXISTS (
10874                         SELECT 1
10875                         FROM
10876                             acq.claim_event evt
10877                             JOIN acq.claim claim ON (
10878                                 claim.id = evt.claim
10879                                 AND claim.lineitem_detail = lid.id
10880                             )
10881                         WHERE
10882                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10883                     )
10884                 )
10885             WHERE
10886                 lid.cancel_reason IS NULL
10887                 AND li.cancel_reason IS NULL -- belt/suspenders
10888                 AND po.cancel_reason IS NULL -- belt/suspenders
10889                 AND lid.recv_time IS NULL
10890                 AND po.state = 'on-order'
10891             ORDER BY 1, 2, 3, 4, 5
10892
10893                 </oils_persist:source_definition>
10894                 <fields>
10895                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10896                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10897                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10898                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10899                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10900                 </fields>
10901                 <links>
10902                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10903                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10904                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10905                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10906                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10907                 </links>
10908         </class>
10909         <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">
10910                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10911                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10912                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10913                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10914                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10915                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10916                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10917                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10918                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10919                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10920                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10921                 </fields>
10922                 <links>
10923                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10924                 </links>
10925     </class>
10926         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10927                 <oils_persist:source_definition>
10928             SELECT * FROM acq.lineitem_summary 
10929                                 WHERE item_count > (invoice_count + cancel_count)
10930         </oils_persist:source_definition>
10931                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10932                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10933                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10934                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10935                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10936                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10937                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10938                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10939                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10940                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10941                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10942                 </fields>
10943                 <links>
10944                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10945                 </links>
10946     </class>
10947         <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">
10948                 <oils_persist:source_definition>
10949
10950                         SELECT  t.*
10951                           FROM  action.transit_copy t
10952                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10953                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10954                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10955
10956                 </oils_persist:source_definition>
10957                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10958                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10959                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10960                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10961                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10962                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10963                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10964                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10965                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10966                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10967                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10968                 </fields>
10969                 <links>
10970                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10971                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10972                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10973                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10974                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10975                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10976                 </links>
10977         </class>
10978
10979     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10980                 <oils_persist:source_definition>
10981
10982         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10983                 SELECT
10984                         cp.id as copy,
10985                         COUNT(circ.id),
10986                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10987                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10988                 FROM
10989                         asset.copy cp
10990                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10991                 GROUP BY 1, 3, 4
10992                 UNION ALL
10993                 SELECT
10994                         cp.id as copy,
10995                         COUNT(circ.id),
10996                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10997                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10998                 FROM
10999                         asset.copy cp
11000                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
11001                 GROUP BY 1, 3, 4
11002                 UNION ALL
11003                 SELECT
11004                         id as copy,
11005                         circ_count,
11006                         -1 AS year,
11007                         false as is_renewal
11008                 FROM
11009                         extend_reporter.legacy_circ_count
11010         )x GROUP BY 1, 3, 4
11011
11012                 </oils_persist:source_definition>
11013         <fields>
11014             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
11015             <field reporter:label="Count" name="count" reporter:datatype="int"/>
11016             <field reporter:label="Year" name="year" reporter:datatype="int"/>
11017             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
11018         </fields>
11019                 <links>
11020                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
11021                 </links>
11022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11023                         <actions>
11024                                 <retrieve/>
11025                         </actions>
11026                 </permacrud>
11027     </class>
11028
11029         <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">
11030                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
11031                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
11032                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
11033                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
11034                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
11035                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
11036                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
11037                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
11038                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
11039                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
11040                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
11041                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
11042                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
11043                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
11044                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
11045                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
11046                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
11047                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
11048                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
11049                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
11050                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
11051                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
11052                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
11053                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
11054                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
11055                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
11056                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
11057                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
11058                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
11059                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
11060                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
11061                 </fields>
11062                 <links>
11063                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
11064                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
11065                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
11066                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
11067                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
11068                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
11069                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11070                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
11071                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
11072                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
11073                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
11074                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
11075                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
11076                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
11077                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
11078                 </links>
11079         </class>
11080
11081     <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">
11082         <fields oils_persist:primary="id">
11083             <field reporter:label="Title" name="title" reporter:datatype="text"/>
11084             <field reporter:label="Author" name="author" reporter:datatype="text"/>
11085             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
11086             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11087             <field reporter:label="Price" name="price" reporter:datatype="money"/>
11088             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
11089             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
11090             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
11091             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
11092             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
11093             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
11094             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
11095             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
11096             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
11097             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
11098             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11099             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11100             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11101             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11102             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11103             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11104             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11105             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11106             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11107             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11108             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11109             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11110             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11111             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11112             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11113             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11114             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11115             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11116             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11117         </fields>
11118         <links>
11119             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11120             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11121             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11122             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11123             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11124             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11125             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11126             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11127         </links>
11128     </class>
11129
11130     <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">
11131         <fields oils_persist:primary="id">
11132             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11133             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11134             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11135             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11136         </fields>
11137         <links>
11138             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11139             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11140         </links>
11141     </class>
11142
11143     <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">
11144         <fields oils_persist:primary="owning_lib">
11145             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11146             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11147             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11148         </fields>
11149         <links>
11150             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11151         </links>
11152     </class>
11153
11154     <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">
11155         <fields oils_persist:primary="id">
11156             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11157             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11158             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11159             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11160             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11161         </fields>
11162         <links>
11163             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11164             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11165             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11166         </links>
11167     </class>
11168
11169     <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">
11170         <fields oils_persist:primary="circ_lib">
11171             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11172             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11173             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11174             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11175         </fields>
11176         <links>
11177             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11178             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11179         </links>
11180     </class>
11181
11182     <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">
11183         <fields oils_persist:primary="id">
11184             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11185             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11186             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11187             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11188             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11189         </fields>
11190         <links>
11191             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11192             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11193             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11194         </links>
11195     </class>
11196
11197     <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">
11198         <fields oils_persist:primary="home_ou">
11199             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11200             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11201             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11202             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11203         </fields>
11204         <links>
11205             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11206             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11207         </links>
11208     </class>
11209         <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">
11210                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11211                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11212                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11213                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11214                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11215                 </fields>
11216                 <links>
11217                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11218                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11219                 </links>
11220                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11221                         <actions>
11222                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11223                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11224                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11225                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11226                         </actions>
11227                 </permacrud>
11228         </class>
11229         <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">
11230                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11231                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11232                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11233                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11234                 </fields>
11235                 <links>
11236                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11237                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11238                         </links>
11239                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11240                 <actions>
11241                                 <create permission="ADMIN_ACQ_FUND_TAG">
11242                                         <context link="tag" field="owner"/>
11243                                 </create>
11244                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11245                                         <context link="tag" field="owner"/>
11246                                 </retrieve>
11247                                 <update permission="ADMIN_ACQ_FUND_TAG">
11248                                         <context link="tag" field="owner"/>
11249                                 </update>
11250                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11251                                         <context link="tag" field="owner"/>
11252                                 </delete>
11253                         </actions>
11254                 </permacrud>
11255         </class>
11256         <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">
11257                 <oils_persist:source_definition><![CDATA[
11258                 SELECT
11259                         poi.purchase_order AS purchase_order,
11260                         ii.invoice AS invoice,
11261                         NULL AS lineitem,
11262                         poi.id AS po_item,
11263                         NULL AS picklist
11264                 FROM
11265                         acq.po_item poi
11266                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11267                 UNION SELECT
11268                         jub.purchase_order AS purchase_order,
11269                         ie.invoice AS invoice,
11270                         jub.id AS lineitem,
11271                         NULL AS po_item,
11272                         jub.picklist AS picklist
11273                 FROM
11274                         acq.lineitem jub
11275                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11276                 UNION SELECT
11277                         ii.purchase_order AS purchase_order,
11278                         ii.invoice AS invoice,
11279                         NULL AS lineitem,
11280                         NULL AS po_item,
11281                         NULL AS picklist
11282                 FROM
11283                         acq.invoice_item ii
11284                 WHERE ii.po_item IS NULL
11285                 UNION SELECT
11286                         ie.purchase_order AS purchase_order,
11287                         ie.invoice AS invoice,
11288                         NULL AS lineitem,
11289                         NULL AS po_item,
11290                         NULL AS picklist
11291                 FROM
11292                         acq.invoice_entry ie
11293                 WHERE ie.lineitem IS NULL
11294                 UNION SELECT
11295                         NULL AS purchase_order,
11296                         NULL AS invoice,
11297                         jub.id AS lineitem,
11298                         NULL AS po_item,
11299                         jub.picklist AS picklist
11300                 FROM
11301                         acq.lineitem jub
11302                 WHERE jub.purchase_order IS NULL
11303                 ]]></oils_persist:source_definition>
11304                 <fields>
11305                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11306                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11307                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11308                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11309                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11310                 </fields>
11311                 <links>
11312                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11313                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11314                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11315                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11316                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11317                 </links>
11318         </class>
11319         <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">
11320                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11321                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11322                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11323                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11324                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11325                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11326                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11327                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11328                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11329                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11330                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11331                 </fields>
11332                 <links>
11333                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11334                 </links>
11335                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11336                         <actions>
11337                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11338                                 <retrieve/>
11339                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11340                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11341                         </actions>
11342                 </permacrud>
11343         </class>
11344
11345         <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">
11346                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11347                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11348                         <field name="date_applied" reporter:datatype="timestamp"/>
11349                         <field name="org" reporter:datatype="org_unit"/>
11350                         <field name="original_value" reporter:datatype="text"/>
11351                         <field name="new_value" reporter:datatype="text"/>
11352                         <field name="field_name" reporter:datatype="link"/>
11353                 </fields>
11354                 <links>
11355                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11356                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11357                 </links>
11358                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11359                         <actions>
11360                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11361                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11362                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11363                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11364                         </actions>
11365                 </permacrud>
11366         </class>
11367         <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">
11368                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11369                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11370                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11371                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11372                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11373                 </fields>
11374                 <links>
11375                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11376                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11377                 </links>
11378         </class>
11379         <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">
11380                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11381                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11382                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11383                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11384                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11385                 </fields>
11386                 <links>
11387                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11388                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11389                 </links>
11390         </class>
11391         <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">
11392                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11393                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11394                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11395                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11396                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11397                 </fields>
11398                 <links>
11399                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11400                 </links>
11401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11402                         <actions>
11403                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11404                                 <retrieve/>
11405                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11406                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11407                         </actions>
11408                 </permacrud>
11409         </class>
11410         <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">
11411                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11412                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11413                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11414                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11415                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11416                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11417                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11418                 </fields>
11419                 <links>
11420                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11421                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11422                 </links>
11423                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11424                         <actions>
11425                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11426                                 <retrieve/>
11427                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11428                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11429                         </actions>
11430                 </permacrud>
11431         </class>
11432         <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">
11433         <oils_persist:source_definition>
11434         SELECT ahcm.target_copy AS "id",count(*) AS "count"
11435          FROM
11436          action.hold_request ahr,
11437          action.hold_copy_map ahcm
11438          WHERE
11439          ahr.cancel_time IS NULL AND
11440          ahr.fulfillment_time IS NULL AND
11441          ahr.capture_time IS NULL AND
11442          ahr.id = ahcm.hold
11443          GROUP BY ahcm.target_copy
11444         </oils_persist:source_definition>
11445         <fields oils_persist:primary="id">
11446             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
11447             <field reporter:label="Holds Count" name="count" reporter:datatype="text"/>
11448         </fields>
11449         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11450             <actions>
11451                <retrieve/>
11452             </actions>
11453         </permacrud>
11454         </class>
11455
11456         <!-- ********************************************************************************************************************* -->
11457
11458 </IDL>
11459
11460 <!--
11461     vim:noet:ts=4:sw=4:
11462 -->