]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
Post-2.5-m1 whitespace fixup
[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                 </fields>
85                 <links>
86                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
87                 </links>
88         </class>
89
90         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
91                 <fields>
92                         <field name="workstation" oils_persist:virtual="true" />
93                         <field name="cash_payment" oils_persist:virtual="true" />
94                         <field name="check_payment" oils_persist:virtual="true" />
95                         <field name="credit_card_payment" oils_persist:virtual="true" />
96                 </fields>
97                 <links>
98                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
99                 </links>
100         </class>
101
102         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
103                 <fields>
104                         <field name="id" oils_persist:virtual="true" />
105                         <field name="children" oils_persist:virtual="true" />
106                         <field name="owner_doc" oils_persist:virtual="true" />
107                         <field name="intra_doc_id" oils_persist:virtual="true" />
108                         <field name="parent_node" oils_persist:virtual="true" />
109                         <field name="node_type" oils_persist:virtual="true" />
110                         <field name="namespace_uri" oils_persist:virtual="true" />
111                         <field name="name" oils_persist:virtual="true" />
112                         <field name="value" oils_persist:virtual="true" />
113                 </fields>
114         </class>
115
116         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
117                 <fields>
118                         <field name="title" oils_persist:virtual="true" />
119                         <field name="author" oils_persist:virtual="true" />
120                         <field name="doc_id" oils_persist:virtual="true" />
121                         <field name="doc_type" oils_persist:virtual="true" />
122                         <field name="pubdate" oils_persist:virtual="true" />
123                         <field name="isbn" oils_persist:virtual="true" />
124                         <field name="publisher" oils_persist:virtual="true" />
125                         <field name="tcn" oils_persist:virtual="true" />
126                         <field name="subject" oils_persist:virtual="true" />
127                         <field name="types_of_resource" oils_persist:virtual="true" />
128                         <field name="call_numbers" oils_persist:virtual="true" />
129                         <field name="edition" oils_persist:virtual="true" />
130                         <field name="online_loc" oils_persist:virtual="true" />
131                         <field name="synopsis" oils_persist:virtual="true" />
132                         <field name="physical_description" oils_persist:virtual="true" />
133                         <field name="toc" oils_persist:virtual="true" />
134                         <field name="copy_count" oils_persist:virtual="true" />
135                         <field name="series" oils_persist:virtual="true" />
136                         <field name="serials" oils_persist:virtual="true" />
137                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
138                 </fields>
139         </class>
140
141         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
142                 <fields>
143                         <field name="err_msg" oils_persist:virtual="true" />
144                         <field name="type" oils_persist:virtual="true" />
145                 </fields>
146         </class>
147
148         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
149                 <fields>
150                         <field name="err_msg" oils_persist:virtual="true" />
151                         <field name="type" oils_persist:virtual="true" />
152                 </fields>
153         </class>
154
155         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
156                 <fields oils_persist:primary="matchpoint">
157                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
158                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
159                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
160                 </fields>
161                 <links>
162                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
163                 </links>
164         </class>
165
166         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
167         <!-- when the time is right, turn me into a view.  -->
168                 <fields>
169             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
170             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
171             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
172             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
173             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
174             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
175             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
176             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
178             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
179                 </fields>
180         </class>
181
182         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
183                 <fields>
184                         <field name="public_name" oils_persist:virtual="true" />
185                         <field name="target_url" oils_persist:virtual="true" />
186                         <field name="target_coverage" oils_persist:virtual="true" />
187                         <field name="target_embargo" oils_persist:virtual="true" />
188                 </fields>
189         </class>
190
191         <!-- Actually in the DB -->
192         <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">
193                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
194                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
195                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
196                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
197                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
198                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
199                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
200                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
201                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
202                 </fields>
203                 <links>
204                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
205                 </links>
206                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
207                         <actions>
208                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
209                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
210                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
211                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
212                         </actions>
213                 </permacrud>
214         </class>
215
216         <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">
217                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
218                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
219                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
228                     <context link="grp" field="owner"/>
229                 </create>
230                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD">
231                     <context link="grp" field="owner"/>
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 permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
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                 </fields>
299                 <links>
300                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
301                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
302                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
303                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_IMPORT_ITEM">
308                     <context link="definition" field="owner"/>
309                                 </create>
310                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
311                     <context link="definition" field="owner"/>
312                                 </retrieve>
313                                 <update permission="UPDATE_IMPORT_ITEM">
314                     <context link="definition" field="owner"/>
315                                 </update>
316                                 <delete permission="DELETE_IMPORT_ITEM">
317                     <context link="definition" field="owner"/>
318                                 </delete>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <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">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
325                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
327                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
329                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
330                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
331                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
332                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
333                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
334                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
335                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
336                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
337                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
338                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
339                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
340                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
341                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
342                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
343                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
344                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
345                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
346                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
347                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
348                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
349                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
350                 </fields>
351                 <links>
352                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
353                 </links>
354                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
355                         <actions>
356                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
357                                 <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"/>
358                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
359                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
360                         </actions>
361                 </permacrud>
362         </class>
363
364         <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">
365                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
366                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
367                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
368                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
369                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
370                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
371                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
372                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
373                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
374                 </fields>
375                 <links>
376                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
377                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
378                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
379                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
380                 </links>
381                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
382                         <actions>
383                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
387                         </actions>
388                 </permacrud>
389         </class>
390
391         <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">
392                 <fields oils_persist:primary="code">
393                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
394                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
395                 </fields>
396                 <links>
397                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
398                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
399                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
400                 </links>
401                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
402                         <actions>
403                                 <retrieve/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
410                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
412                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
414                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
415                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
416                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
417                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
418                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
419                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
420                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
422                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
423                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
424                 </fields>
425                 <links>
426                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
427                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
428                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
429                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
430             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
431             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
432             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
433                 </links>
434                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
435                         <actions>
436                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
439                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
440                         </actions>
441                 </permacrud>
442         </class>
443
444         <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">
445                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
446                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
447                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
448                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
449                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
450                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
451                 </fields>
452                 <links/>
453                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
454                         <actions>
455                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
456                 <retrieve/>
457                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
458                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
459                         </actions>
460                 </permacrud>
461         </class>
462
463         <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">
464                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
465                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
466                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
467                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
468                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
469                 </fields>
470                 <links>
471                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
472                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
473                 </links>
474                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
475                         <actions>
476                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
480                         </actions>
481                 </permacrud>
482         </class>
483
484         <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">
485                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
486                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
487                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
488                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
489                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
490                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
491                 </fields>
492                 <links>
493                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
494                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
495                 </links>
496                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
497                         <actions>
498                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
501                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
502                         </actions>
503                 </permacrud>
504         </class>
505
506         <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">
507                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
508                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
509                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
510                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
511                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
512                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
513                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
514                 </fields>
515                 <links>
516                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
517                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
518                 </links>
519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
520                         <actions>
521                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                         </actions>
526                 </permacrud>
527         </class>
528
529         <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">
530                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
531                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
532                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
533                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
534                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
535                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
536                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
537                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
538                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
539                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
540                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
541                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
542                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
543                 </fields>
544                 <links>
545                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
546                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
547                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
548             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
549             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
550                 </links>
551                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
552                         <actions>
553                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
556                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
557                         </actions>
558                 </permacrud>
559         </class>
560
561         <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">
562                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
563                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
564                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
565                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
566                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
567                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
568                 </fields>
569                 <links/>
570                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
571                         <actions>
572                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                 <retrieve/>
574                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
575                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
576                         </actions>
577                 </permacrud>
578         </class>
579
580         <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">
581                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
582                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
583                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
584                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
585                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
586                 </fields>
587                 <links>
588                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
589                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
590                 </links>
591                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
592                         <actions>
593                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
596                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
597                         </actions>
598                 </permacrud>
599         </class>
600
601         <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">
602                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
603                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
604                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
605                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
606                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
607                 </fields>
608                 <links>
609                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
610                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
611                 </links>
612                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
613                         <actions>
614                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                         </actions>
619                 </permacrud>
620         </class>
621
622         <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">
623                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
624                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
625                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
626                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
627                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
628                 </fields>
629                 <links>
630                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
631                 </links>
632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
633                         <actions>
634                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
636                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
637                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
638                         </actions>
639                 </permacrud>
640         </class>
641
642         <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">
643                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
644                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
645                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
646                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
647                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
648                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
649                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
650                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
651             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
652                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
653                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
654                 </fields>
655                 <links>
656                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
657                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
658                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
659                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
660                 </links>
661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
662                         <actions>
663                                 <create permission="ADMIN_IMPORT_MATCH_SET">
664                     <context link="match_set" field="owner"/>
665                                 </create>
666                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
667                     <context link="match_set" field="owner"/>
668                                 </retrieve>
669                                 <update permission="ADMIN_IMPORT_MATCH_SET">
670                     <context link="match_set" field="owner"/>
671                                 </update>
672                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
673                     <context link="match_set" field="owner"/>
674                                 </delete>
675                         </actions>
676                 </permacrud>
677         </class>
678
679         <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">
680                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
681                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
682                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
683                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
684                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
685                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
686                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
687                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
688                 </fields>
689                 <links>
690                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
691                 </links>
692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
693                         <actions>
694                                 <create permission="ADMIN_IMPORT_MATCH_SET">
695                     <context link="match_set" field="owner"/>
696                                 </create>
697                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
698                     <context link="match_set" field="owner"/>
699                                 </retrieve>
700                                 <update permission="ADMIN_IMPORT_MATCH_SET">
701                     <context link="match_set" field="owner"/>
702                                 </update>
703                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
704                     <context link="match_set" field="owner"/>
705                                 </delete>
706                         </actions>
707                 </permacrud>
708         </class>
709
710         <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">
711                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
712                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
713                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
714                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
715                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
716                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
717                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
718                 </fields>
719                 <links>
720                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
721                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
722                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
723                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
724                 </links>
725         </class>
726
727     <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">
728         <fields oils_persist:primary="name">
729             <field reporter:label="Name" name="name" reporter:datatype="text"/>
730             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
731             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
732             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
733         </fields>
734         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
735             <actions>
736                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
739                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
740             </actions>
741         </permacrud>
742     </class>
743
744     <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">
745         <fields oils_persist:primary="id">
746             <field reporter:label="ID" name="id" reporter:datatype="id"/>
747             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
748             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
749             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
750             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
751         </fields>
752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
753             <actions>
754                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <retrieve/>
756                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
757                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758             </actions>
759         </permacrud>
760     </class>
761
762         <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">
763                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
764                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
765                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
766                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
767                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
768                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
769                 </fields>
770                 <links>
771                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
772                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
773                 </links>
774         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
775             <actions>
776                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <retrieve/>
778                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
779                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780             </actions>
781         </permacrud>
782         </class>
783
784         <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">
785                 <fields oils_persist:primary="name">
786                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
787                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
788                         <field reporter:label="Description" name="description" reporter:datatype="text" />
789                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
790                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
791                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
792                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
793                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
794                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
795                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
796                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
797                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
798                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
799                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
800                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
801                 </fields>
802                 <links>
803                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
804                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
805                 </links>
806         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
807             <actions>
808                 <create permission="ADMIN_SVF" global_required="true"/>
809                 <retrieve/>
810                 <update permission="ADMIN_SVF" global_required="true"/>
811                 <delete permission="ADMIN_SVF" global_required="true"/>
812             </actions>
813         </permacrud>
814         </class>
815
816         <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">
817                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
818                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
819                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
820                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
821             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
822                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
823                 </fields>
824                 <links/>
825         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
826             <actions>
827                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <retrieve/>
829                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
830                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
831             </actions>
832         </permacrud>
833         </class>
834
835         <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">
836                 <fields oils_persist:primary="id">
837                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
838                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
839                 </fields>
840                 <links>
841                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
842                 </links>
843         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
844             <actions>
845                 <retrieve/>
846             </actions>
847         </permacrud>
848         </class>
849
850         <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">
851                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
852                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
853                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
854                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
855                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
856                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
857                 </fields>
858                 <links>
859                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
860                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
861                 </links>
862         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
863             <actions>
864                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
865                 <retrieve/>
866                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
867                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
868             </actions>
869         </permacrud>
870         </class>
871
872         <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">
873                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
874                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
875                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
876                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
877                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
878                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
879                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
880                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
881             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
882                 </fields>
883                 <links>
884                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
885                 </links>
886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
887             <actions>
888                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
889                 <retrieve/>
890                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
891                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
892             </actions>
893         </permacrud>
894         </class>
895
896         <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">
897                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
898                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
899                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
900                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
901                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
902                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
903                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
904                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
905                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
906                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
907                 </fields>
908                 <links>
909                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
910                 </links>
911         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
912             <actions>
913                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
914                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
915                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
916                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
917             </actions>
918         </permacrud>
919         </class>
920
921     <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">
922         <fields oils_persist:primary="name">
923             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
924             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
925             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
926             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
927             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
928             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
929             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
930             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
931             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
932             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
933         </fields>
934         <links>
935             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
936             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
937         </links>
938         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
939             <actions>
940                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
941                 <retrieve/>
942                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
943                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
944             </actions>
945         </permacrud>
946     </class>
947
948     <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">
949         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
950             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
951             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
952             <field reporter:label="Name" name="name" reporter:datatype="text"/>
953             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
954             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
955             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
956             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
957         </fields>
958         <links>
959             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
960         </links>
961         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
962             <actions>
963                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
964                 <retrieve/>
965                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
966                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
967             </actions>
968         </permacrud>
969     </class>
970
971     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
972                         oils_obj:fieldmapper="config::z3950_index_field_map" 
973                         oils_persist:tablename="config.z3950_index_field_map" 
974                         reporter:label="Z39.50 Index Field Map">
975         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
976             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
977             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
978             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
979             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
980             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
981             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
982         </fields>
983         <links>
984             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
985             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
986             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
987         </links>
988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
989             <actions>
990                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
991                 <retrieve/>
992                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
993                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
994             </actions>
995         </permacrud>
996     </class>
997
998
999         <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">
1000                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1001                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1002                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1003                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1004                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1005                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1006                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1007                 </fields>
1008                 <links>
1009             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1010             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1011                 </links>
1012                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1013                         <actions>
1014                                 <retrieve/>
1015                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1016                         </actions>
1017                 </permacrud>
1018         </class>
1019
1020         <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">
1021                 <fields oils_persist:primary="key">
1022                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1023                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1024                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1025                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1026                 </fields>
1027                 <links/>
1028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1029                         <actions>
1030                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1031                                 <retrieve/>
1032                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1033                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1034                         </actions>
1035                 </permacrud>
1036         </class>
1037
1038         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1039                 <fields oils_persist:primary="module">
1040                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1041                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1042                 </fields>
1043                 <links/>
1044         </class>
1045
1046         <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">
1047                 <fields oils_persist:primary="module">
1048                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1049                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1050                 </fields>
1051                 <links/>
1052                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1053                         <actions>
1054                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1055                                 <retrieve/>
1056                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1057                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1058                         </actions>
1059                 </permacrud>
1060         </class>
1061
1062         <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">
1063                 <fields oils_persist:primary="module">
1064                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1065                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1066                 </fields>
1067                 <links/>
1068                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1069                         <actions>
1070                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1071                                 <retrieve/>
1072                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1073                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1074                         </actions>
1075                 </permacrud>
1076         </class>
1077
1078         <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">
1079                 <fields oils_persist:primary="module">
1080                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1081                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1082                 </fields>
1083                 <links/>
1084                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1085                         <actions>
1086                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1087                                 <retrieve/>
1088                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1089                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1090                         </actions>
1091                 </permacrud>
1092         </class>
1093
1094         <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">
1095                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1096                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1097                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1098                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1099                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1100                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1101                 </fields>
1102                 <links>
1103                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1104                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1105                 </links>
1106                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1107                         <actions>
1108                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1109                     <context link="event_def" field="owner"/>
1110                 </create>
1111                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1112                     <context link="event_def" field="owner"/>
1113                 </retrieve>
1114                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1115                     <context link="event_def" field="owner"/>
1116                 </update>
1117                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1118                     <context link="event_def" field="owner"/>
1119                 </delete>
1120                         </actions>
1121                 </permacrud>
1122         </class>
1123
1124         <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">
1125                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1126                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1127                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1128                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1129                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1130                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1131                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1132                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1133                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1134                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1135                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1136                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1137                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1138                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1139                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1140                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1141                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1142                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1143                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1144                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1145                 </fields>
1146                 <links>
1147                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1148                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1149                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1150                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1151                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1152                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1153                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1154                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1155                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1156                 </links>
1157                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1158                         <actions>
1159                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1160                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1161                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1162                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1163                         </actions>
1164                 </permacrud>
1165         </class>
1166
1167         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1168                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1169                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1170                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1171                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1172                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1173                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1174                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1175                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1176                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1177                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1178                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1179                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1180                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1181                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1182                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1183                 </fields>
1184                 <links>
1185                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1186                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1187                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1188                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1189                 </links>
1190         </class>
1191
1192         <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">
1193                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1194                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1195                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1196                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1197                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1198                 </fields>
1199                 <links>
1200                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1201                 </links>
1202                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1203                         <actions>
1204                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1205                     <context link="event_def" field="owner"/>
1206                 </create>
1207                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1208                     <context link="event_def" field="owner"/>
1209                 </retrieve>
1210                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1211                     <context link="event_def" field="owner"/>
1212                 </update>
1213                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1214                     <context link="event_def" field="owner"/>
1215                 </delete>
1216                         </actions>
1217                 </permacrud>
1218         </class>
1219
1220         <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">
1221                 <oils_persist:source_definition><![CDATA[
1222                 SELECT  atevdef.hook,
1223                         atevdef.name,
1224                         atevdef.reactor,
1225                         atev.id,
1226                         atev.event_def,
1227                         atev.add_time,
1228                         atev.run_time,
1229                         atev.start_time,
1230                         atev.update_time,
1231                         atev.complete_time,
1232                         atev.update_process,
1233                         atev.state,
1234                         atev.user_data,
1235                         atev.template_output,
1236                         atev.error_output,
1237                         atev.async_output,
1238                         targ_circ.id AS target_circ,
1239                         targ_ahr.id AS target_hold,
1240                         COALESCE(
1241                                 targ_circ.circ_lib,
1242                                 targ_ahr.pickup_lib
1243                         ) AS perm_lib
1244                 FROM action_trigger.event atev
1245                 JOIN action_trigger.event_definition atevdef ON
1246                         (atevdef.id = atev.event_def)
1247                 JOIN action_trigger.hook ath ON
1248                         (ath.key = atevdef.hook)
1249                 LEFT JOIN action.circulation targ_circ ON
1250                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1251                 LEFT JOIN action.hold_request targ_ahr ON
1252                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1253                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1254                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1255                                 'circ.staff.max_visible_event_age',
1256                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1257                         ) UNION
1258                         SELECT '1000 YEARS'::INTERVAL AS value
1259                 ) ous)
1260                 ]]></oils_persist:source_definition>
1261                 <fields oils_persist:primary="id">
1262                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1263                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1264                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1265                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1266                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1267                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1268                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1269                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1270                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1271                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1272                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1273                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1274                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1275                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1276                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1277                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1278                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1279                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1280                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1281                 </fields>
1282                 <links>
1283                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1284                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1285                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1286                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1287                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1288                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1289                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1290                 </links>
1291                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1292                         <actions>
1293                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1294                         </actions>
1295                 </permacrud>
1296         </class>
1297
1298         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1299                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1300                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1301                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1302                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1303                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1304                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1305                 </fields>
1306                 <links>
1307                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1308                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1309                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1310                 </links>
1311         </class>
1312
1313         <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">
1314                 <fields oils_persist:primary="code">
1315                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1316                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1317                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1318                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1319                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1320                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1321                 </fields>
1322                 <links/>
1323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1324             <actions>
1325                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1326                 <retrieve/>
1327                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1328                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1329             </actions>
1330         </permacrud>
1331         </class>
1332
1333         <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">
1334                 <fields oils_persist:primary="code">
1335                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1336                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1337                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1338                 </fields>
1339                 <links/>
1340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1341             <actions>
1342                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1343                 <retrieve/>
1344                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1345                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1346             </actions>
1347         </permacrud>
1348         </class>
1349
1350         <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">
1351                 <fields oils_persist:primary="code">
1352                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1353                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1354                 </fields>
1355                 <links/>
1356         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1357             <actions>
1358                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1359                 <retrieve/>
1360                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1361                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1362             </actions>
1363         </permacrud>
1364         </class>
1365
1366         <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">
1367                 <fields oils_persist:primary="code">
1368                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1369                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1370                 </fields>
1371                 <links/>
1372         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1373             <actions>
1374                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1375                 <retrieve/>
1376                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1377                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1378             </actions>
1379         </permacrud>
1380         </class>
1381
1382         <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">
1383                 <fields oils_persist:primary="code">
1384                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1385                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1386                 </fields>
1387                 <links/>
1388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1389             <actions>
1390                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1391                 <retrieve/>
1392                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1393                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1394             </actions>
1395         </permacrud>
1396         </class>
1397
1398         <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">
1399                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1400                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1401                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1402                 </fields>
1403                 <links/>
1404         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1405             <actions>
1406                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1407                 <retrieve/>
1408                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1409                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1410             </actions>
1411         </permacrud>
1412         </class>
1413
1414         <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">
1415                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1416                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1417                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1418                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1419                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1420                 </fields>
1421         <links>
1422             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1423             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1424             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1425         </links>
1426         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1427             <actions>
1428                 <create permission="UPDATE_COPY">
1429                     <context link="target_copy" field="circ_lib"/>
1430                 </create>
1431                 <retrieve/>
1432                 <update permission="UPDATE_COPY">
1433                     <context link="target_copy" field="circ_lib"/>
1434                 </update>
1435                 <delete permission="UPDATE_COPY">
1436                     <context link="target_copy" field="circ_lib"/>
1437                 </delete>
1438             </actions>
1439         </permacrud>
1440         </class>
1441
1442         <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">
1443                 <fields oils_persist:primary="code">
1444                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1445                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1446                 </fields>
1447                 <links/>
1448         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1449             <actions>
1450                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1451                 <retrieve/>
1452                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1453                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1454             </actions>
1455         </permacrud>
1456         </class>
1457
1458         <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">
1459                 <fields oils_persist:primary="code">
1460                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1461                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1462                 </fields>
1463                 <links/>
1464         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1465             <actions>
1466                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1467                 <retrieve/>
1468                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1469                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1470             </actions>
1471         </permacrud>
1472         </class>
1473
1474         <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">
1475                 <fields oils_persist:primary="code">
1476                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1477                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1478                 </fields>
1479                 <links/>
1480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1481             <actions>
1482                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1483                 <retrieve/>
1484                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1485                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1486             </actions>
1487         </permacrud>
1488         </class>
1489
1490     <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">
1491         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1492             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1493             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1494             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1495             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1496             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1497             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1498             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1499             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1500             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1501             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1502             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1503             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1504             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1505             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1506             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1507             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1508             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1509         </fields>
1510         <links/>
1511         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1512             <actions>
1513                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1514                 <retrieve/>
1515                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1516                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1517             </actions>
1518         </permacrud>
1519     </class>
1520
1521     <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">
1522         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1523             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1524             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1525             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1526             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1527             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1528             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1529             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1530             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1531             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1532             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1533             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1534             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1535             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1536             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1537             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1538             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1539             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1540             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1541             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1542         </fields>
1543         <links/>
1544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1545             <actions>
1546                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1547                 <retrieve/>
1548                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1549                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1550             </actions>
1551         </permacrud>
1552     </class>
1553
1554     <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">
1555         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1556             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1557             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1558             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1559             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1560             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1561         </fields>
1562         <links>
1563             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1564             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1565             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1566         </links>
1567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1568             <actions>
1569                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1570                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1571                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1572                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1573             </actions>
1574         </permacrud>
1575     </class>
1576
1577         <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">
1578                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1579                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1580                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1581                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1582                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1583                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1584                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1585                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1586                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1587                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1588                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1589                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1590                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1591                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1592                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1593                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1594                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1595             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1596                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1597                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1598                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1599                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1600                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1601                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1602                 </fields>
1603                 <links>
1604                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1605                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1606                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1607                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1608                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1609                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1610                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1611                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1612                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1613                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1614                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1615                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1616                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1617             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1618                 </links>
1619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1620             <actions>
1621                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1622                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1623                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1624                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1625             </actions>
1626         </permacrud>
1627         </class>
1628
1629         <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">
1630                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1631                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1632                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1633                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1634                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1635                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1636                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1637                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1638                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1639                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1640                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1641                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1642                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1643                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1644                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1645                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1646             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1647                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1648                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1649             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1650                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1651                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1652                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1653                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1654             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1655             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1656             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1657                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1658                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1659                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1660                 </fields>
1661                 <links>
1662                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1663                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1664                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1665                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1666                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1667                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1668                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1669                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1670                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1671                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1672                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1673                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1674                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1675                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1676             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1677                 </links>
1678         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1679             <actions>
1680                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1681                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1682                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1683                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1684             </actions>
1685         </permacrud>
1686         </class>
1687
1688     <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">
1689         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1690             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1691             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1692             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1693         </fields>
1694         <links/>
1695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1696             <actions>
1697                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1698                 <retrieve/>
1699                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1700                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1701             </actions>
1702         </permacrud>
1703     </class>
1704
1705     <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">
1706         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1707             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1708             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1709             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1710             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1711             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1712             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1713             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1714         </fields>
1715         <links>
1716             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1717         </links>
1718         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1719             <actions>
1720                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1721                 <retrieve/>
1722                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1723                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1724             </actions>
1725         </permacrud>
1726     </class>
1727
1728     <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">
1729         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1730             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1731             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1732             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1733             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1734             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1735         </fields>
1736         <links>
1737             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1738             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1739         </links>
1740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1741             <actions>
1742                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1743                     <context link="matchpoint" field="org_unit"/>
1744                 </create>
1745                 <retrieve/>
1746                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1747                     <context link="matchpoint" field="org_unit"/>
1748                 </update>
1749                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1750                     <context link="matchpoint" field="org_unit"/>
1751                 </delete>
1752             </actions>
1753         </permacrud>
1754     </class>
1755
1756     <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">
1757         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1758             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1759             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1760             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1761         </fields>
1762         <links>
1763             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1764             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1765         </links>
1766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1767             <actions>
1768                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1769                     <context link="limit_set" field="owning_lib"/>
1770                 </create>
1771                 <retrieve/>
1772                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1773                     <context link="limit_set" field="owning_lib"/>
1774                 </update>
1775                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1776                     <context link="limit_set" field="owning_lib"/>
1777                 </delete>
1778             </actions>
1779         </permacrud>
1780     </class>
1781     <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">
1782         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1783             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1784             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1785             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1786         </fields>
1787         <links>
1788             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1789             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1790         </links>
1791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1792             <actions>
1793                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1794                     <context link="limit_set" field="owning_lib"/>
1795                 </create>
1796                 <retrieve/>
1797                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1798                     <context link="limit_set" field="owning_lib"/>
1799                 </update>
1800                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1801                     <context link="limit_set" field="owning_lib"/>
1802                 </delete>
1803             </actions>
1804         </permacrud>
1805     </class>
1806
1807     <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">
1808         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1809             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1810             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1811             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1812             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1813         </fields>
1814         <links>
1815             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1816             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1817         </links>
1818         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1819             <actions>
1820                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1821                     <context link="limit_set" field="owning_lib"/>
1822                 </create>
1823                 <retrieve/>
1824                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1825                     <context link="limit_set" field="owning_lib"/>
1826                 </update>
1827                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1828                     <context link="limit_set" field="owning_lib"/>
1829                 </delete>
1830             </actions>
1831         </permacrud>
1832     </class>
1833
1834         <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">
1835                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1836                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1837                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1838                 </fields>
1839                 <links/>
1840         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1841             <actions>
1842                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1843                 <retrieve/>
1844                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1845                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1846             </actions>
1847         </permacrud>
1848         </class>
1849
1850         <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">
1851                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1852                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1853                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1854                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1855                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1856                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1857                 </fields>
1858                 <links>
1859                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1860                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1861                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1862                 </links>
1863         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1864             <actions>
1865                 <create permission="ADMIN_SURVEY">
1866                     <context link="survey" field="owner"/>
1867                 </create>
1868                 <retrieve/>
1869                 <update permission="ADMIN_SURVEY">
1870                     <context link="survey" field="owner"/>
1871                 </update>
1872                 <delete permission="ADMIN_SURVEY">
1873                     <context link="survey" field="owner"/>
1874                 </delete>
1875             </actions>
1876         </permacrud>
1877         </class>
1878         <class id="mbts" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
1879                 <fields oils_persist:primary="id" oils_persist:sequence="">
1880                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1881                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1882                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1883                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1884                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1885                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1886                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1887                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1888                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1889                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1890                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1891                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1892                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1893                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1894                 </fields>
1895                 <links>
1896                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1897                 </links>
1898         </class>
1899         <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">
1900                 <fields oils_persist:primary="id" oils_persist:sequence="">
1901                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1902                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1903                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1904                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1905                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1906                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1907                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1908                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1909                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1910                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1911                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1912                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1913                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1914                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1915                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1916                 </fields>
1917                 <links>
1918                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1919                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1920                 </links>
1921         </class>
1922         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1923                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1924                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1925                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1926                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1927                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1928                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1929                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1930                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1931                 </fields>
1932                 <links>
1933                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1934                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1935                 </links>
1936         </class>
1937         <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">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1939                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1940                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1941                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1942                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1943                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1944                 </fields>
1945                 <links>
1946                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1947                 </links>
1948         </class>
1949         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1950                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1951                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1952                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1953                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1954                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1955                 </fields>
1956                 <links>
1957                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1958                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1959                 </links>
1960         </class>
1961         <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">
1962                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1963                         <field name="field" reporter:datatype="link"/>
1964                         <field name="id" reporter:datatype="id" />
1965                         <field name="source" reporter:datatype="link"/>
1966                         <field name="value" reporter:datatype="text"/>
1967                 </fields>
1968                 <links>
1969                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1970                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1971                 </links>
1972         </class>
1973         <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">
1974                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1975                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1976                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1977                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1978                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1979                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1980                 </fields>
1981                 <links>
1982                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1983                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1984                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1985                 </links>
1986         </class>
1987         <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">
1988                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1989                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1990                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1991                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1992                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1993                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1994                 </fields>
1995                 <links>
1996                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1997                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1998                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1999                 </links>
2000         </class>
2001         <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">
2002                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2003                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2004                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2005                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2006                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2007                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2008                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2009                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2010                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2011                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2012                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2013                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2014                 </fields>
2015                 <links>
2016                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2017                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2018                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2019                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2020                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2021                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2022                 </links>
2023         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2024             <actions>
2025                 <create permission="TRANSIT_COPY" context_field="owner">
2026                     <context link="target_copy" field="circ_lib"/>
2027                 </create>
2028                 <retrieve/>
2029                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2030                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2031             </actions>
2032         </permacrud>
2033         </class>
2034         <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">
2035                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2036                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2037                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2038                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2039                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2040                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2041                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2042                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2043                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2044                 </fields>
2045                 <links>
2046                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2047                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2048                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2049                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2050                 </links>
2051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2052             <actions>
2053                 <create permission="ADMIN_SURVEY">
2054                     <context link="survey" field="owner"/>
2055                 </create>
2056                 <retrieve/>
2057                 <update permission="ADMIN_SURVEY">
2058                     <context link="survey" field="owner"/>
2059                 </update>
2060                 <delete permission="ADMIN_SURVEY">
2061                     <context link="survey" field="owner"/>
2062                 </delete>
2063             </actions>
2064         </permacrud>
2065         </class>
2066         <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">
2067                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2068                         <field name="bucket" />
2069                         <field name="id" reporter:datatype="id" />
2070                         <field name="target_copy" reporter:datatype="link"/>
2071                         <field name="create_time" reporter:datatype="timestamp" />
2072                         <field name="pos" reporter:datatype="int" />
2073                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2074                 </fields>
2075                 <links>
2076                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2077                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2078             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2079                 </links>
2080         </class>
2081         <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">
2082                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2083                         <field name="id" reporter:datatype="id" />
2084                         <field name="item" reporter:datatype="link"/>
2085                         <field name="note" reporter:datatype="text" />
2086                 </fields>
2087                 <links>
2088                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2089                 </links>
2090         </class>
2091
2092         <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">
2093                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2094                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2095                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2096                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2097                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2098                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2099                 </fields>
2100                 <links>
2101                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2102                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2103                 </links>
2104                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2105                         <actions>
2106                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2107                                 <retrieve/>
2108                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2109                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2110                         </actions>
2111                 </permacrud>
2112         </class>
2113
2114         <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">
2115                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2116                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2117                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2118                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2119                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2120                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2121                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2122                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2123                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2124                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2125                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2126                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2127                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2128                 </fields>
2129                 <links>
2130                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2131                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2132                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2133                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2134                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2135                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2136                 </links>
2137                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2138                         <actions>
2139                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2140                                 <retrieve/>
2141                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2142                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2143                         </actions>
2144                 </permacrud>
2145         </class>
2146
2147         <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">
2148                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2149                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2150                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2151                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2152                 </fields>
2153                 <links>
2154                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2155                 </links>
2156                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2157                         <actions>
2158                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2159                                 <retrieve/>
2160                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2161                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2162                         </actions>
2163                 </permacrud>
2164         </class>
2165
2166         <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">
2167                 <fields oils_persist:primary="code">
2168                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2169                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2170                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2171                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2172                 </fields>
2173                 <links>
2174                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2175                 </links>
2176                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2177                         <actions>
2178                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2179                                 <retrieve/>
2180                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2181                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2182                         </actions>
2183                 </permacrud>
2184         </class>
2185
2186         <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">
2187                 <fields oils_persist:primary="code">
2188                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2189                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2190                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2191                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2192                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2193                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2194                 </fields>
2195                 <links>
2196                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2197                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2198                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2199                 </links>
2200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2201                         <actions>
2202                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2203                                 <retrieve/>
2204                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2205                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2206                         </actions>
2207                 </permacrud>
2208         </class>
2209
2210     <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">
2211         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2212             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2213             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2214             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2215         </fields>
2216         <links>
2217             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2218             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2219         </links>
2220         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2221             <actions>
2222                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2223                 <retrieve/>
2224                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2225                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2226             </actions>
2227         </permacrud>
2228     </class>
2229
2230         <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">
2231                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2232                         <field name="active" reporter:datatype="bool"/>
2233                         <field name="create_date" reporter:datatype="timestamp"/>
2234                         <field name="creator" />
2235                         <field name="deleted" reporter:datatype="bool"/>
2236                         <field name="edit_date" reporter:datatype="timestamp"/>
2237                         <field name="editor" />
2238                         <field name="id" reporter:datatype="id" />
2239                         <field name="last_xact_id" />
2240                         <field name="marc" />
2241                         <field name="source" />
2242                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2243                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2244                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2245                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2246                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2247                 </fields>
2248                 <links>
2249                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2250                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2251                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2252                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2253                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2254                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2255                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2256                 </links>
2257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2258                         <actions>
2259                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2260                                 <retrieve/>
2261                                 <update permission="UPDATE_MARC" global_required="true"/>
2262                                 <delete permission="UPDATE_MARC" global_required="true"/>
2263                         </actions>
2264                 </permacrud>
2265         </class>
2266         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2267                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2268                         <field name="char_encoding" />
2269                         <field name="id" />
2270                         <field name="record" />
2271                         <field name="record_status" />
2272                         <field name="thesaurus" />
2273                 </fields>
2274                 <links>
2275                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2276                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2277                 </links>
2278         </class>
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2281                         <field name="id" reporter:datatype="id" />
2282                         <field name="bib" reporter:datatype="link" />
2283                         <field name="authority" reporter:datatype="link" />
2284                 </fields>
2285                 <links>
2286                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2287                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2288                 </links>
2289         </class>
2290         <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">
2291                 <fields oils_persist:primary="code" oils_persist:sequence="">
2292                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2293                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2294                 </fields>
2295                 <links/>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2299                 <retrieve/>
2300                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2301                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2302             </actions>
2303         </permacrud>
2304         </class>
2305         <class id="mccp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2306                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2307                         <field name="accepting_usr" />
2308                         <field name="amount" reporter:datatype="money" />
2309                         <field name="amount_collected" reporter:datatype="money" />
2310                         <field name="approval_code" reporter:datatype="text"/>
2311                         <field name="cash_drawer" reporter:datatype="link"/>
2312                         <field name="cc_first_name" reporter:datatype="text"/>
2313                         <field name="cc_last_name" reporter:datatype="text"/>
2314                         <field name="cc_number" reporter:datatype="text"/>
2315                         <field name="cc_order_number" reporter:datatype="text"/>
2316                         <field name="cc_type" reporter:datatype="text"/>
2317                         <field name="cc_processor" reporter:datatype="text"/>
2318                         <field name="expire_month" reporter:datatype="int" />
2319                         <field name="expire_year" reporter:datatype="int" />
2320                         <field name="id" reporter:datatype="id" />
2321                         <field name="note" reporter:datatype="text"/>
2322                         <field name="payment_ts" reporter:datatype="timestamp"/>
2323                         <field name="xact" reporter:datatype="link"/>
2324                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2325                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2326                 </fields>
2327                 <links>
2328                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2329                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2330                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2331                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2332                 </links>
2333         </class>
2334         <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">
2335                 <fields oils_persist:primary="name">
2336                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2337                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2338                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2339                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2340                 </fields>
2341                 <links/>
2342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2343             <actions>
2344                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2345                 <retrieve/>
2346                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2347                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2348             </actions>
2349         </permacrud>
2350         </class>
2351
2352         <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">
2353                 <fields oils_persist:primary="alias">
2354                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2355                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2356                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2357                 </fields>
2358                 <links>
2359                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2360                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2361                 </links>
2362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2363             <actions>
2364                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2365                 <retrieve/>
2366                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2367                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2368             </actions>
2369         </permacrud>
2370         </class>
2371
2372         <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">
2373                 <fields oils_persist:primary="name">
2374                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2375                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2376                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2377                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2378                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2379                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2380                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2381                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2382                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2383                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2384                 </fields>
2385                 <links>
2386                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2387                 </links>
2388         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2389             <actions>
2390                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2391                 <retrieve/>
2392                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2393                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2394             </actions>
2395         </permacrud>
2396         </class>
2397
2398         <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">
2399                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2400                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2401                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2402                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2403                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2404                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2405                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2406                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2407                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2408                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2409                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2410                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2411                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2412                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2413                 </fields>
2414                 <links>
2415                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2416                 </links>
2417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2418             <actions>
2419                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2420                 <retrieve/>
2421                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2422                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2423             </actions>
2424         </permacrud>
2425         </class>
2426         <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">
2427                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2428                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2429                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2430                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2431                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2432                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2433                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2434                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2435                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2436                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2437                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2438                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2439                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2440                 </fields>
2441                 <links>
2442                 </links>
2443                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2444                         <actions>
2445                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2446                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2447                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2448                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2449                         </actions>
2450                 </permacrud>
2451         </class>
2452         <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">
2453                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2454                         <field name="id" reporter:datatype="id" />
2455                         <field name="name" reporter:datatype="text"/>
2456                         <field name="xpath" reporter:datatype="text"/>
2457                         <field name="format" reporter:datatype="link"/>
2458                         <field name="first_word" reporter:datatype="bool" />
2459                 </fields>
2460                 <links/>
2461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2462             <actions>
2463                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2464                 <retrieve/>
2465                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2466                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2467             </actions>
2468         </permacrud>
2469         </class>
2470         <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">
2471                 <fields oils_persist:primary="code" oils_persist:sequence="">
2472                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2473                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2474                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2475                 </fields>
2476                 <links/>
2477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2478             <actions>
2479                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2480                 <retrieve/>
2481                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2482                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2483             </actions>
2484         </permacrud>
2485         </class>
2486         <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">
2487                 <fields oils_persist:primary="code" oils_persist:sequence="">
2488                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2489                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2490                 </fields>
2491                 <links/>
2492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2493             <actions>
2494                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2495                 <retrieve/>
2496                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2497                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2498             </actions>
2499         </permacrud>
2500         </class>
2501     <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">
2502         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2503             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2504             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2505             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2506             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2507         </fields>
2508         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2509             <actions>
2510                 <retrieve/>
2511             </actions>
2512         </permacrud>
2513     </class>
2514         <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">
2515                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2516                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2517                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2518                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2519                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2520                 </fields>
2521                 <links>
2522                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2523                 </links>
2524         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2525             <actions>
2526                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2527                 <retrieve/>
2528                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2529                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2530             </actions>
2531         </permacrud>
2532         </class>
2533         <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">
2534                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2535                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2536                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2537                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2538                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2539                 </fields>
2540                 <links>
2541                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2542                 </links>
2543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2544             <actions>
2545                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2546                 <retrieve/>
2547                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2548                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2549             </actions>
2550         </permacrud>
2551         </class>
2552         <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">
2553                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2554                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2555                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2556                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2557                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2558                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2559                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2560                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2561                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2562                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2563                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2564                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2565                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2566                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2567                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2568                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2569                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2570                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2571                 </fields>
2572                 <links>
2573                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2574                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2575                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2576                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2577                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2578                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2579                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2580                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2581                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2582                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2583                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2584                 </links>
2585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2586             <actions>
2587                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2588                 <retrieve/>
2589                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2590                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2591             </actions>
2592         </permacrud>
2593         </class>
2594         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2595                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2596                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2597                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2598                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2599                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2600                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2601                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2603                 </fields>
2604                 <links>
2605                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2606                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2607         </links>
2608         </class>
2609         <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">
2610                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2612                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2613                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2614                 </fields>
2615                 <links>
2616                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2617                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2618                 </links>
2619         </class>
2620         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2621                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2622                         <field name="id" reporter:datatype="id" />
2623                         <field name="value" oils_persist:i18n="true" />
2624                 </fields>
2625                 <links/>
2626         </class>
2627         <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">
2628                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2629                         <field name="balance_owed" reporter:datatype="money" />
2630                         <field name="total_owed" reporter:datatype="money" />
2631                         <field name="total_paid" reporter:datatype="money" />
2632                         <field name="usr" reporter:datatype="link"/>
2633                 </fields>
2634                 <links>
2635                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2636         </links>
2637         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2638             <actions>
2639                 <retrieve permission="VIEW_USER">
2640                     <context link="usr" field="home_ou"/>
2641                 </retrieve>
2642             </actions>
2643         </permacrud>
2644         </class>
2645         <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">
2646                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2647                         <field name="collector" />
2648                         <field name="enter_time" reporter:datatype="timestamp"/>
2649                         <field name="id" reporter:datatype="id" />
2650                         <field name="location" reporter:datatype="link"/>
2651                         <field name="usr" reporter:datatype="link"/>
2652                 </fields>
2653                 <links>
2654                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2655                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2656                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2657                 </links>
2658         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2659             <actions>
2660                 <create permission="money.collections_tracker.create" context_field="location"/>
2661                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2662                 <delete permission="money.collections_tracker.create" context_field="location"/>
2663             </actions>
2664         </permacrud>
2665         </class>
2666         <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">
2667                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2668                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2669                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2670                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2671                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2672                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2673                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2674                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2675                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2676                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2677                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2678                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2679                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2680                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2681                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2682                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2683                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2684                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2685                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2686                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2687                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2688                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2689                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2690                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2691                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2692                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2693                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2694                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2695                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2696                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2697                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2698                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2699                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2700                 </fields>
2701                 <links>
2702                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2703                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2704                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2705                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2706                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2707                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2708                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2709                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2710                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2711                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2712                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2713                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2714                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2715                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2716                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2717                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2718                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2719                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2720                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2721                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2722                 </links>
2723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2724             <actions>
2725                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2726                 <retrieve/>
2727                 <update permission="UPDATE_MARC" global_required="true"/>
2728             </actions>
2729         </permacrud>
2730         </class>
2731         <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">
2732                 <fields oils_persist:primary="id">
2733                         <field name="dow_0_close" />
2734                         <field name="dow_0_open" />
2735                         <field name="dow_1_close" />
2736                         <field name="dow_1_open" />
2737                         <field name="dow_2_close" />
2738                         <field name="dow_2_open" />
2739                         <field name="dow_3_close" />
2740                         <field name="dow_3_open" />
2741                         <field name="dow_4_close" />
2742                         <field name="dow_4_open" />
2743                         <field name="dow_5_close" />
2744                         <field name="dow_5_open" />
2745                         <field name="dow_6_close" />
2746                         <field name="dow_6_open" />
2747                         <field name="id" reporter:datatype="id" />
2748                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2749                 </fields>
2750                 <links>
2751                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2752                 </links>
2753         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2754             <actions>
2755                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2756                 <retrieve/>
2757                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2758                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2759             </actions>
2760         </permacrud>
2761         </class>
2762         <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">
2763                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2764                         <field name="id" reporter:datatype="id" />
2765                         <field name="record" reporter:datatype="link"/>
2766                         <field name="label" reporter:datatype="text"/>
2767                         <field name="label_sortkey" reporter:datatype="text"/>
2768                 </fields>
2769                 <links>
2770                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2771                 </links>
2772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2773             <actions>
2774                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2775                 <retrieve/>
2776                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2777                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2778             </actions>
2779         </permacrud>
2780         </class>
2781         <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">
2782                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2783                         <field name="id" reporter:datatype="id" />
2784                         <field name="target_copy" reporter:datatype="link" />
2785                         <field name="part" reporter:datatype="link"/>
2786                 </fields>
2787                 <links>
2788                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2789                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2790                 </links>
2791         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2792             <actions>
2793                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2794                 <retrieve/>
2795                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2796                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2797             </actions>
2798         </permacrud>
2799         </class>
2800         <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">
2801                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2802                         <field name="close_end" reporter:datatype="timestamp" />
2803                         <field name="close_start" reporter:datatype="timestamp" />
2804                         <field name="id" reporter:datatype="id" />
2805                         <field name="org_unit" reporter:datatype="org_unit"/>
2806                         <field name="reason" reporter:datatype="text"/>
2807                 </fields>
2808                 <links>
2809                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2810                 </links>
2811         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2812             <actions>
2813                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2814                 <retrieve/>
2815                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2816                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2817             </actions>
2818         </permacrud>
2819         </class>
2820         <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">
2821                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2822                         <field name="extended" reporter:datatype="interval"/>
2823                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2824                         <field name="max_renewals" reporter:datatype="int" />
2825                         <field name="name" reporter:datatype="text"/>
2826                         <field name="normal" reporter:datatype="interval"/>
2827                         <field name="shrt" reporter:datatype="interval"/>
2828                 </fields>
2829                 <links>
2830                 </links>
2831         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2832             <actions>
2833                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2834                 <retrieve/>
2835                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2836                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2837             </actions>
2838         </permacrud>
2839         </class>
2840
2841         <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">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2843                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2844                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2845             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2846                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2847             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2848                 </fields>
2849                 <links>
2850             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2851                 </links>
2852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2853             <actions>
2854                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2855                 <retrieve/>
2856                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2857                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2858             </actions>
2859                 </permacrud>
2860         </class>
2861
2862         <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">
2863                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2864                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2865                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2866                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2867             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2868                 </fields>
2869                 <links>
2870                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2871                 </links>
2872                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2873             <actions>
2874                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2875                 <retrieve/>
2876                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2877                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2878             </actions>
2879                 </permacrud>
2880         </class>
2881
2882         <class id="mobts" controller="open-ils.cstore" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
2883                 <fields oils_persist:primary="id" oils_persist:sequence="">
2884                         <field name="balance_owed" reporter:datatype="money"/>
2885                         <field name="id" reporter:datatype="id" />
2886                         <field name="last_billing_note" reporter:datatype="text"/>
2887                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2888                         <field name="last_billing_type" reporter:datatype="text"/>
2889                         <field name="last_payment_note" reporter:datatype="text"/>
2890                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2891                         <field name="last_payment_type" reporter:datatype="text"/>
2892                         <field name="total_owed" reporter:datatype="money"/>
2893                         <field name="total_paid" reporter:datatype="money"/>
2894                         <field name="usr" reporter:datatype="link"/>
2895                         <field name="xact_finish" reporter:datatype="timestamp" />
2896                         <field name="xact_start" reporter:datatype="timestamp" />
2897                         <field name="xact_type" reporter:datatype="text"/>
2898                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2899                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2900                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2901                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2902                         <field name="billing_location" reporter:datatype="link"/>
2903                 </fields>
2904                 <links>
2905                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2906                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2907                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2908                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2909                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2910                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2911                 </links>
2912         </class>
2913         <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">
2914                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2915                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2916                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2917                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2918                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2919                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2920                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2921                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2922                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2923                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2924                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2925                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2926                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2927                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2928                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2929                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2930                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2931                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2932                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2933                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2934                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2935                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2936                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2937                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2938                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2939                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2940                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2941                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2942                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2943                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2944                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2945                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2946                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2947                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2948                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2949                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2950                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2951                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2952                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2953                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2954                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2955                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2956                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2957                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2958                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2959                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2960                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2961                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2962                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2963                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2964                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2965                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2966                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2967                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2968                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2969                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2970                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2971                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2972                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2973                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2974                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2975                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2978                 </fields>
2979                 <links>
2980                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2981                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2982                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2983                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2984                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2985                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2986                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2987                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2988                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2989                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2990                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2991                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2992                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2993                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2994                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2995                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2996                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2997                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2998                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2999                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3000                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3001                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3002                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3003                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3004                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3005                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3006                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3007                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3008                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3009                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3010                 </links>
3011                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3012                         <actions>
3013                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3014                         </actions>
3015                 </permacrud>
3016         </class>
3017         <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">
3018                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3019                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3020                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3021                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3022                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3023                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3024                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3025                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3026                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3027         </fields>
3028                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3029                         <actions>
3030                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3031                                 <retrieve/>
3032                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3033                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3034                         </actions>
3035                 </permacrud>
3036         </class>
3037         <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">
3038                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3039                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3040                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3041                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3042                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3043         </fields>
3044         <links>
3045                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3046                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3047                 </links>
3048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3049                         <actions>
3050                                 <retrieve permission="RUN_REPORTS">
3051                                         <context link="usr" field="home_ou" />
3052                                 </retrieve>
3053                         </actions>
3054                 </permacrud>
3055         </class>
3056         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3057                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3058                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3059                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3060                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3061                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3062                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3063                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3064         </fields>
3065         <links>
3066                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3067                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3068                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3069                 </links>
3070                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3071                         <actions>
3072                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3073                                         <context link="usr" field="home_ou" />
3074                                         <context link="ws" field="owning_lib" />
3075                                 </retrieve>
3076                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3077                                         <context link="usr" field="home_ou" />
3078                                         <context link="ws" field="owning_lib" />
3079                                 </create>
3080                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3081                                         <context link="usr" field="home_ou" />
3082                                         <context link="ws" field="owning_lib" />
3083                                 </update>
3084                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3085                                         <context link="usr" field="home_ou" />
3086                                         <context link="ws" field="owning_lib" />
3087                                 </delete>
3088                         </actions>
3089                 </permacrud>
3090         </class>
3091         <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">
3092                 <fields oils_persist:primary="name">
3093                         <field name="name" reporter:datatype="text"/>
3094                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3095                 </fields>
3096                 <links/>
3097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3098                         <actions>
3099                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3100                                 <retrieve/>
3101                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3102                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3103                         </actions>
3104                 </permacrud>
3105         </class>
3106         <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">
3107                 <fields oils_persist:primary="name">
3108                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3109                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3110                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3111                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3112                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3113                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3114                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3115                 </fields>
3116                 <links>
3117                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3118                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3119                 </links>
3120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3121                         <actions>
3122                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3123                                 <retrieve/>
3124                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3125                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3126                         </actions>
3127                 </permacrud>
3128         </class>
3129         <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">
3130                 <fields oils_persist:primary="name">
3131                         <field name="name" reporter:datatype="text"/>
3132                         <field name="label" reporter:datatype="text"/>
3133                         <field name="description" reporter:datatype="text"/>
3134                         <field name="datatype" reporter:datatype="text"/>
3135                         <field name="view_perm" reporter:datatype="link"/>
3136                         <field name="update_perm" reporter:datatype="link"/>
3137                         <field name="fm_class" reporter:datatype="text"/>
3138                         <field name="grp" reporter:datatype="link"/>
3139                 </fields>
3140                 <links>
3141                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3142                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3143                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3144                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3145                 </links>
3146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3147                         <actions>
3148                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3149                                 <retrieve/>
3150                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3151                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3152                         </actions>
3153                 </permacrud>
3154         </class>
3155         <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">
3156                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3157                         <field name="id" />
3158                         <field name="name"  reporter:datatype="text"/>
3159                         <field name="org_unit" reporter:datatype="org_unit"/>
3160                         <field name="value"  reporter:datatype="text"/>
3161                 </fields>
3162                 <links>
3163                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3164                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3165                 </links>
3166         </class>
3167         <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">
3168                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3169                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3170                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3171                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3172                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3173                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3174                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3175                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3176                 </fields>
3177                 <links>
3178                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3179                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3180                 </links>
3181         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3182             <actions>
3183                 <create permission="CREATE_COPY_NOTE">
3184                     <context link="owning_copy" field="circ_lib"/>
3185                 </create>
3186                 <retrieve permission="VIEW_COPY_NOTES">
3187                     <context link="owning_copy" field="circ_lib"/>
3188                 </retrieve>
3189                 <update permission="UPDATE_COPY_NOTE">
3190                     <context link="owning_copy" field="circ_lib"/>
3191                 </update>
3192                 <delete permission="DELETE_COPY_NOTE">
3193                     <context link="owning_copy" field="circ_lib"/>
3194                 </delete>
3195             </actions>
3196         </permacrud>
3197         </class>
3198         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3199                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3200                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3201                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3202                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3203                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3204                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3205                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3206                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3207                 </fields>
3208                 <links>
3209                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3210                 </links>
3211         </class>
3212         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3213                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3214                         <field name="fingerprint"  reporter:datatype="text"/>
3215                         <field name="id" reporter:datatype="id" />
3216                         <field name="master_record" reporter:datatype="link"/>
3217                         <field name="mods"  reporter:datatype="text"/>
3218                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3219                 </fields>
3220                 <links>
3221                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3222                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3223                 </links>
3224         </class>
3225         <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">
3226                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3227                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3228                         <field name="name"  reporter:datatype="text"/>
3229                 </fields>
3230                 <links/>
3231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3232             <actions>
3233                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3234                 <retrieve/>
3235                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3236                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3237             </actions>
3238         </permacrud>
3239         </class>
3240         <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">
3241                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3242                         <field name="code"  reporter:datatype="text"/>
3243                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3244                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3245                 </fields>
3246                 <links/>
3247         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3248             <actions>
3249                 <create permission="CREATE_PERM" global_required="true"/>
3250                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3251                 <update permission="UPDATE_PERM" global_required="true"/>
3252                 <delete permission="DELETE_PERM" global_required="true"/>
3253             </actions>
3254         </permacrud>
3255         </class>
3256         <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">
3257                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3258                         <field name="id" reporter:datatype="id" />
3259                         <field name="metarecord" reporter:datatype="link"/>
3260                         <field name="source" reporter:datatype="link"/>
3261                 </fields>
3262                 <links>
3263                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3264                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3265                 </links>
3266         </class>
3267         <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">
3268                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3269                         <field name="id" reporter:datatype="id" />
3270                         <field name="field" reporter:datatype="link"/>
3271                         <field name="source" reporter:datatype="link"/>
3272                         <field name="value"  reporter:datatype="text"/>
3273                 </fields>
3274                 <links>
3275                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3276                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3277                 </links>
3278         </class>
3279         <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">
3280                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3281                         <field name="id" reporter:datatype="id" />
3282                         <field name="value" reporter:datatype="text"/>
3283                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3284                 </fields>
3285                 <links>
3286                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3287                 </links>
3288         </class>
3289         <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">
3290                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3291                         <field name="id" reporter:datatype="id" />
3292                         <field name="entry" reporter:datatype="link"/>
3293                         <field name="def" reporter:datatype="link"/>
3294                         <field name="source" reporter:datatype="link"/>
3295                 </fields>
3296                 <links>
3297                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3298                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3299                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3300                 </links>
3301         </class>
3302         <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">
3303                 <oils_persist:source_definition>
3304                         SELECT * FROM metabib.author_field_entry
3305                                                 UNION ALL
3306                         SELECT * FROM metabib.keyword_field_entry
3307                                                 UNION ALL
3308                         SELECT * FROM metabib.identifier_field_entry
3309                                                 UNION ALL
3310                         SELECT * FROM metabib.title_field_entry
3311                                                 UNION ALL
3312                         SELECT * FROM metabib.subject_field_entry
3313                                                 UNION ALL
3314                         SELECT * FROM metabib.series_field_entry
3315                 </oils_persist:source_definition>
3316                 <fields>
3317                         <field name="field" reporter:datatype="link"/>
3318                         <field name="id" reporter:datatype="id" />
3319                         <field name="source" reporter:datatype="link"/>
3320                         <field name="value"  reporter:datatype="text"/>
3321                 </fields>
3322                 <links>
3323                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3324                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3325                 </links>
3326         </class>
3327         <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">
3328                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3329                         <field name="field" reporter:datatype="link"/>
3330                         <field name="id" reporter:datatype="id" />
3331                         <field name="source" reporter:datatype="link"/>
3332                         <field name="value"  reporter:datatype="text"/>
3333                 </fields>
3334                 <links>
3335                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3336                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3337                 </links>
3338         </class>
3339         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3340                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3341                         <field name="accepting_usr" reporter:datatype="link"/>
3342                         <field name="amount" reporter:datatype="money" />
3343                         <field name="amount_collected" reporter:datatype="money" />
3344                         <field name="cash_drawer" reporter:datatype="link"/>
3345                         <field name="id" reporter:datatype="id" />
3346                         <field name="note"  reporter:datatype="text"/>
3347                         <field name="payment_ts" reporter:datatype="timestamp"/>
3348                         <field name="xact" reporter:datatype="link"/>
3349                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3350                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3351                 </fields>
3352                 <links>
3353                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3354                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3355                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3356                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3357                 </links>
3358         </class>
3359         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3360                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3361                         <field name="accepting_usr" reporter:datatype="link"/>
3362                         <field name="amount" reporter:datatype="money" />
3363                         <field name="amount_collected" reporter:datatype="money" />
3364                         <field name="id" reporter:datatype="id" />
3365                         <field name="note"  reporter:datatype="text"/>
3366                         <field name="payment_ts" reporter:datatype="timestamp"/>
3367                         <field name="xact" reporter:datatype="link"/>
3368                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3369                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3370                 </fields>
3371                 <links>
3372                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3373                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3374                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3375                 </links>
3376         </class>
3377         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3378                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3379                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3380                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3381                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3382                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3383                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3384                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3385                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3386                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3387                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3388                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3389                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3390                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3391                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3392                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3393                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3394                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3395                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3396                 </fields>
3397                 <links>
3398                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3399                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3400                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3401                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3402                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3403                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3404                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3405                 </links>
3406         </class>
3407
3408         <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">
3409                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3410                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3411                         <field name="name"  reporter:datatype="text"/>
3412                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3413                         <field name="block_list" reporter:datatype="text"/>
3414                         <field name="staff_alert" reporter:datatype="bool"/>
3415                         <field name="org_depth" reporter:datatype="int"/>
3416                 </fields>
3417                 <links/>
3418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3419             <actions>
3420                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3421                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3422                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3423                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3424             </actions>
3425         </permacrud>
3426         </class>
3427         <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">
3428                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3429                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3430                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3431                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3432                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3433                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3434                 </fields>
3435                 <links>
3436                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3437                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3438                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3439         </links>
3440         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3441             <actions>
3442                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3443                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3444                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3445                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3446             </actions>
3447         </permacrud>
3448         </class>
3449         <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">
3450                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3451                         <field name="holdable" reporter:datatype="bool"/>
3452                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3453                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3454                         <field name="opac_visible" reporter:datatype="bool"/>
3455             <field name="copy_active" reporter:datatype="bool"/>
3456             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3457                 </fields>
3458                 <links/>
3459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3460             <actions>
3461                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3462                 <retrieve/>
3463                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3464                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3465             </actions>
3466         </permacrud>
3467         </class>
3468         <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">
3469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3470                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3471                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3472                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3473                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3474                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3475                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3476                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3477                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3478                 </fields>
3479                 <links>
3480                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3481                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3482                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3483                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3484                 </links>
3485                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3486                         <actions>
3487                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3488                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3489                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3490                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3491                         </actions>
3492                 </permacrud>
3493         </class>
3494         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3495                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3496                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3497                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3498                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3499                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3500                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3501                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3502                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3503                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3504                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3505                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3506                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3507                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3508                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3509                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3510                 </fields>
3511                 <links>
3512                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3513                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3514                 </links>
3515         </class>
3516         <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">
3517                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3518                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3519                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3520                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3521                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3522                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3523                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3524                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3525                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3526                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3527                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3528                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3529                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3530                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3531                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3532                 </fields>
3533                 <links>
3534                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3535                 </links>
3536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3537                         <actions>
3538                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3539                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3540                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3541                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3542                         </actions>
3543                 </permacrud>
3544         </class>
3545
3546
3547         <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">
3548                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3549                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3550                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3551                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3552                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3553                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3554                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3555                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3556                 </fields>
3557                 <links>
3558                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3559                 </links>
3560         </class>
3561
3562         <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">
3563                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3564                         <field name="call_number" />
3565                         <field name="create_date" reporter:datatype="timestamp"/>
3566                         <field name="creator" reporter:datatype="link"/>
3567                         <field name="id" reporter:datatype="id" />
3568                         <field name="pub" reporter:datatype="bool"/>
3569                         <field name="title"  reporter:datatype="text"/>
3570                         <field name="value"  reporter:datatype="text"/>
3571                 </fields>
3572                 <links>
3573                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3574                 </links>
3575         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3576             <actions>
3577                 <create permission="CREATE_VOLUME_NOTE">
3578                     <context link="call_number" field="owning_lib"/>
3579                 </create>
3580                 <retrieve permission="VIEW_VOLUME_NOTES">
3581                     <context link="call_number" field="owning_lib"/>
3582                 </retrieve>
3583                 <update permission="UPDATE_VOLUME_NOTE">
3584                     <context link="call_number" field="owning_lib"/>
3585                 </update>
3586                 <delete permission="DELETE_VOLUME_NOTE">
3587                     <context link="call_number" field="owning_lib"/>
3588                 </delete>
3589             </actions>
3590         </permacrud>
3591         </class>
3592         <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">
3593                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3594                         <field name="create_date" reporter:datatype="timestamp"/>
3595                         <field name="creator" reporter:datatype="link"/>
3596                         <field name="edit_date" reporter:datatype="timestamp"/>
3597                         <field name="editor" reporter:datatype="link"/>
3598                         <field name="id" reporter:datatype="id" />
3599                         <field name="record" reporter:datatype="link"/>
3600                         <field name="value" reporter:datatype="text"/>
3601                 </fields>
3602                 <links>
3603                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3604                 </links>
3605         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3606             <actions>
3607                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3608                 <retrieve/>
3609                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3610                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3611             </actions>
3612         </permacrud>
3613         </class>
3614         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3615         <oils_persist:source_definition>
3616 SELECT  usr,
3617         SUM(
3618             CASE
3619                 WHEN (
3620                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3621                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3622                 ) THEN 1
3623                 ELSE 0
3624             END
3625         ) AS out,
3626
3627         SUM(
3628             CASE
3629                 WHEN (
3630                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3631                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3632                 ) THEN 1
3633                 ELSE 0
3634             END
3635         ) AS overdue,
3636
3637         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3638         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3639         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3640   FROM  action.circulation
3641   WHERE checkin_time IS NULL
3642   GROUP BY 1
3643         </oils_persist:source_definition>
3644         <fields oils_persist:primary="usr">
3645             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3646             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3647             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3648             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3649             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3650             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3651         </fields>
3652         <links>
3653             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3654         </links>
3655         </class>
3656         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3657         <oils_persist:source_definition>
3658 SELECT  usr,
3659         ARRAY_TO_STRING(ARRAY_ACCUM(
3660             CASE
3661                 WHEN (
3662                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3663                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3664                 ) THEN id
3665                 ELSE 0
3666             END
3667         ),',') AS out,
3668
3669         ARRAY_TO_STRING(ARRAY_ACCUM(
3670             CASE
3671                 WHEN (
3672                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3673                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3674                 ) THEN id
3675                 ELSE 0
3676             END
3677         ),',') AS overdue,
3678
3679         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3680         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3681         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3682   FROM  action.circulation
3683   WHERE checkin_time IS NULL
3684   GROUP BY 1
3685         </oils_persist:source_definition>
3686         <fields oils_persist:primary="usr">
3687             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3688             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3689             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3690             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3691             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3692             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3693         </fields>
3694         <links>
3695             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3696         </links>
3697         </class>
3698         <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">
3699                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3700                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3701                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3702                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3703                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3704                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3705                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3706                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3707                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3708                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3709                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3710                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3711                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3712                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3713                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3714                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3715                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3716                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3717                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3718                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3719                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3720                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3721                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3722                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3723                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3724                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3725                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3726                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3727                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3728                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3729                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3730                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3731                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3732                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3733                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3734                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3735                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3736                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3737                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3738                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3739                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3740                 </fields>
3741                 <links>
3742                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3743                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3744                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3745                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3746                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3747                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3748                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3749                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3750                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3751                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3752                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3753                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3754                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3755                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3756                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3757                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3758                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3759                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3760                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3761                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3762                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3763                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3764                 </links>
3765                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3766                         <actions>
3767                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3768                         </actions>
3769                 </permacrud>
3770         </class>
3771         <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">
3772                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3773                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3774                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3775                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3776                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3777                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3778                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3779                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3780                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3781                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3782                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3783                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3784                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3785                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3786                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3787                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3788                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3789                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3790                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3791                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3792                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3793                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3794                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3795                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3796                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3797                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3798                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3799                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3800                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3801                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3802                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3803                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3804                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3805                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3806                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3807                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3808                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3809                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3810                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3811                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3812                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3813                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3814                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3815                 </fields>
3816                 <links>
3817                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3818                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3819                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3820                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3821                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3822                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3823                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3824                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3825                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3826                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3827                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3828                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3829                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3830                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3831                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3832                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3833                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3834                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3835                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3836                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3837                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3838                 </links>
3839         </class>
3840         <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">
3841                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3842                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3843                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3844                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3845                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3846                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3847                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3848                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3849                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3850                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3851                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3852                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3853                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3854                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3855                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3856                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3857                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3858                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3859                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3860                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3861                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3862                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3863                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3864                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3865                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3866                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3867                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3868                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3869                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3870                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3871                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3872                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3873                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3874                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3875                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3876                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3877                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3878                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3879                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3880                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3881                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3882                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3883                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3884                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3885                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3886                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3887                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3888                 </fields>
3889                 <links>
3890                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3891                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3892                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3893                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3894                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3895                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3896                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3897                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3898                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3899                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3900                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3901                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3902                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3903                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3904                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3905                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3906                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3907                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3908                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3909                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3910                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3911                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3912                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3913                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3914                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3915                 </links>
3916         </class>
3917
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3920                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3921                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3922                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3923                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3924                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3925                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3926                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3927                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3928                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3929                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3930                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3933                 </fields>
3934                 <links>
3935                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3936                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3937                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3938                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3939                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3940                 </links>
3941                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3942                         <actions>
3943                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3944                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3945                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3946                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3947                         </actions>
3948                 </permacrud>
3949         </class>
3950
3951         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3952                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3953                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3954                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3955                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3956                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3957                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3958                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3959                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3960                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3961                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3962                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3963                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3964                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3965                 </fields>
3966                 <links>
3967                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3968                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3969                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3970                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3971                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3972                 </links>
3973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3974                         <actions>
3975                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3976                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3977                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3978                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3979                         </actions>
3980                 </permacrud>
3981         </class>
3982         
3983         <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">
3984                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3985                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3986                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3987                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3988                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3989                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3990                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3991                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3992                 </fields>
3993                 <links>
3994                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3995                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3996                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3997                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3998                 </links>
3999                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4000                         <actions>
4001                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4002                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4003                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4004                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4005                         </actions>
4006                 </permacrud>
4007         </class>
4008         
4009         <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">
4010                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4011                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4012                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4013                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4014                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4015                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4016                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4017                 </fields>
4018                 <links>
4019                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4020                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4021                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4022                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4023                 </links>
4024                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4025                         <actions>
4026                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4027                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4028                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4029                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4030                         </actions>
4031                 </permacrud>
4032         </class>
4033         
4034         <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">
4035                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4036                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4037                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4038                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4039                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4040                 </fields>
4041                 <links>
4042                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4043                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4044                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4045                 </links>
4046                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4047                         <actions>
4048                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4049                     <context link="resource" field="owner" />
4050                 </create>
4051                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4052                     <context link="resource" field="owner" />
4053                 </retrieve>
4054                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4055                     <context link="resource" field="owner" />
4056                 </update>
4057                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4058                     <context link="resource" field="owner" />
4059                 </delete>
4060                         </actions>
4061                 </permacrud>
4062         </class>
4063         
4064         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4065                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4066                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4067                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4068                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4069                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4070                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4071                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4072                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4073                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4074                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4075                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4076                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4077                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4078                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4079                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4080                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4081                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4082                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4083                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4084                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4085                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4086                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4087                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4088                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4089                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4090                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4091                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4092                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4093                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4094                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4095                 </fields>
4096                 <links>
4097                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4098                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4099                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4100                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4101                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4102                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4103                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4104                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4105                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4106                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4107                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4108                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4109                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4110                 </links>
4111                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4112                         <actions>
4113                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4114                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4115                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4116                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4117                         </actions>
4118                 </permacrud>
4119         </class>
4120         
4121         <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">
4122                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4123                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4124                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4125                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4126                 </fields>
4127                 <links>
4128                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4129                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4130                 </links>
4131                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4132                         <actions>
4133                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4134                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4135                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4136                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4137                         </actions>
4138                 </permacrud>
4139         </class>
4140
4141         <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">
4142                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4143                         <field name="bucket" reporter:datatype="link"/>
4144                         <field name="id" reporter:datatype="id" />
4145                         <field name="target_call_number" reporter:datatype="link" />
4146                         <field name="create_time" reporter:datatype="timestamp" />
4147                         <field name="pos" reporter:datatype="int" />
4148                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4149                 </fields>
4150                 <links>
4151                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4152                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4153             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4154                 </links>
4155         </class>
4156         <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">
4157                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4158                         <field name="id" reporter:datatype="id" />
4159                         <field name="item" reporter:datatype="link"/>
4160                         <field name="note" reporter:datatype="text" />
4161                 </fields>
4162                 <links>
4163                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4164                 </links>
4165         </class>
4166         <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">
4167                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4168                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4169                         <field name="btype" reporter:datatype="text"/>
4170                         <field name="id" reporter:datatype="id" />
4171                         <field name="name" reporter:datatype="text"/>
4172                         <field name="description" reporter:datatype="text"/>
4173                         <field name="owner" reporter:datatype="link"/>
4174                         <field name="pub" reporter:datatype="bool"/>
4175                         <field name="create_time" reporter:datatype="timestamp" />
4176                 </fields>
4177                 <links>
4178                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4179                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4180                 </links>
4181         </class>
4182         <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">
4183                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4184                         <field name="id" reporter:datatype="id" />
4185                         <field name="bucket" reporter:datatype="link"/>
4186                         <field name="note" reporter:datatype="text" />
4187                 </fields>
4188                 <links>
4189                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4190                 </links>
4191         </class>
4192         <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">
4193                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4194                         <field name="hold" reporter:datatype="link"/>
4195                         <field name="id" reporter:datatype="id" />
4196                         <field name="target_copy" reporter:datatype="link"/>
4197                         <field name="proximity" reporter:datatype="number"/>
4198                 </fields>
4199                 <links>
4200                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4201                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4202                 </links>
4203         </class>
4204         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4205                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4206                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4207                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4208                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4209                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4210                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4211                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4212                 </fields>
4213                 <links>
4214                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4215                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4216                 </links>
4217         </class>
4218         <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">
4219                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4220                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4221                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4222                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4223                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4224                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4225                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4226                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4227                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4228                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4229                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4230                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4231                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4232                 </fields>
4233                 <links>
4234                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4235                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4236                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4237                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4238                 </links>
4239         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4240             <actions>
4241                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4242                 <retrieve/>
4243                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4244                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4245             </actions>
4246         </permacrud>
4247         </class>
4248         <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">
4249                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4250                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4251                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4252                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4253                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4254             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4255             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4256             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4257                 </fields>
4258                 <links>
4259                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4260                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4261                 </links>
4262         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4263             <actions>
4264                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4265                 <retrieve/>
4266                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4267                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4268             </actions>
4269         </permacrud>
4270         </class>
4271         <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">
4272                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4273                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4274             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4275             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4276                 </fields>
4277                 <links>
4278                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4279                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4280                 </links>
4281         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4282             <actions>
4283                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4284                                         <context link="lgroup" field="owner" />
4285                 </create>
4286                 <retrieve/>
4287                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4288                                         <context link="lgroup" field="owner" />
4289                 </update>
4290                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4291                                         <context link="lgroup" field="owner" />
4292                 </delete>
4293             </actions>
4294         </permacrud>
4295         </class>
4296
4297     <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">
4298         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4299             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4300             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4301             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4302             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4303         </fields>
4304         <links>
4305             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4306             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4307         </links>
4308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4309             <actions>
4310                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4311                 <retrieve/>
4312                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4313                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4314             </actions>
4315         </permacrud>
4316     </class>
4317
4318         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4319                 <fields>
4320                         <field name="sre_id" oils_persist:virtual="true" />
4321                         <field name="location" oils_persist:virtual="true" />
4322                         <field name="owning_lib" oils_persist:virtual="true" />
4323                         <field name="basic_holdings" oils_persist:virtual="true" />
4324                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4325                         <field name="supplement_holdings" oils_persist:virtual="true" />
4326                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4327                         <field name="index_holdings" oils_persist:virtual="true" />
4328                         <field name="index_holdings_add" oils_persist:virtual="true" />
4329                         <field name="online" oils_persist:virtual="true" />
4330                         <field name="missing" oils_persist:virtual="true" />
4331                         <field name="incomplete" oils_persist:virtual="true" />
4332                 </fields>
4333         </class>
4334
4335         <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">
4336                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4337                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4338                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4339                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4340                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4341                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4342                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4343                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4344                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4345                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4346                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4347                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4348                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4349                 </fields>
4350                 <links>
4351                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4352                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4353                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4354                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4355                 </links>
4356                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4357                         <actions>
4358                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4359                                 <retrieve/>
4360                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4361                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4362                         </actions>
4363                 </permacrud>
4364         </class>
4365
4366         <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">
4367                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4368                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4369                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4370                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4371                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4372                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4373                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4374                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4375                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4376                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4377                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4378                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4379                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4380                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4381                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4382                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4383                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4384                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4385                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4386                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4387                 </fields>
4388                 <links>
4389                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4390                 </links>
4391                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4392                         <actions>
4393                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4394                                         <context link="subscription" field="owning_lib" />
4395                                 </create>
4396                                 <retrieve />
4397                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4398                                         <context link="subscription" field="owning_lib" />
4399                                 </update>
4400                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4401                                         <context link="subscription" field="owning_lib" />
4402                                 </delete>
4403                         </actions>
4404                 </permacrud>
4405         </class>
4406
4407         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4408                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4409                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4410                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4411                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4412                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4413                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4414                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4415                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4416                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4417                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4419                 </fields>
4420                 <links>
4421                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4422                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4423                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4424                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4425                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4426                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4427                 </links>
4428                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4429                         <actions>
4430                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4431                                 <retrieve />
4432                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4433                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4434                         </actions>
4435                 </permacrud>
4436         </class>
4437
4438         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4439                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4440                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4441                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4442                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4443                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4444                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4445                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4446                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4447                 </fields>
4448                 <links>
4449                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4450                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4451                 </links>
4452         </class>
4453
4454         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4455                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4456                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4457                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4458                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4459                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4460                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4461                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4462                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4463                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4464                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4465                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4466                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4467                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4468                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4469                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4470                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4471                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4472                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4473                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4474                 </fields>
4475                 <links>
4476                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4477                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4478                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4479                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4480                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4481                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4482                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4483                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4484                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4485                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4486                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4487                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4488                 </links>
4489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4490                         <actions>
4491                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4492                                 <retrieve />
4493                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4494                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4495                         </actions>
4496                 </permacrud>
4497         </class>
4498
4499         <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">
4500                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4501                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4502                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4503                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4504                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4505                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4506                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4507                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4508                 </fields>
4509                 <links>
4510                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4511                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4512                 </links>
4513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4514                         <actions>
4515                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4516                                         <context link="distribution" field="holding_lib" />
4517                                 </create>
4518                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4519                                         <context link="distribution" field="holding_lib" />
4520                                 </retrieve>
4521                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4522                                         <context link="distribution" field="holding_lib" />
4523                                 </update>
4524                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4525                                         <context link="distribution" field="holding_lib" />
4526                                 </delete>
4527                         </actions>
4528                 </permacrud>
4529         </class>
4530
4531         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4532                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4533                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4534                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4535                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4536                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4537                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4538                 </fields>
4539                 <links>
4540                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4541                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4542                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4543                 </links>
4544                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4545                         <actions>
4546                                 <create permission="ADMIN_SERIAL_STREAM">
4547                                         <context link="distribution" field="holding_lib" />
4548                                 </create>
4549                                 <retrieve />
4550                                 <update permission="ADMIN_SERIAL_STREAM">
4551                                         <context link="distribution" field="holding_lib" />
4552                                 </update>
4553                                 <delete permission="ADMIN_SERIAL_STREAM">
4554                                         <context link="distribution" field="holding_lib" />
4555                                 </delete>
4556                         </actions>
4557                 </permacrud>
4558         </class>
4559
4560         <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">
4561                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4562                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4563                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4564                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4565                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4566                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4567                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4568                 </fields>
4569                 <links>
4570                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4571                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4572                 </links>
4573                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4574                         <actions>
4575                                 <create permission="ADMIN_SERIAL_STREAM">
4576                                         <context link="stream" jump="distribution" field="holding_lib" />
4577                                 </create>
4578                                 <retrieve permission="RECEIVE_SERIAL">
4579                                         <context link="stream" jump="distribution" field="holding_lib" />
4580                                 </retrieve>
4581                                 <update permission="ADMIN_SERIAL_STREAM">
4582                                         <context link="stream" jump="distribution" field="holding_lib" />
4583                                 </update>
4584                                 <delete permission="ADMIN_SERIAL_STREAM">
4585                                         <context link="stream" jump="distribution" field="holding_lib" />
4586                                 </delete>
4587                         </actions>
4588                 </permacrud>
4589         </class>
4590
4591         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4592                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4593                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4594                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4595                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4596                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4597                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4598                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4599                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4600                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4601                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4602                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4603                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4604                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4605                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4606                 </fields>
4607                 <links>
4608                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4609                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4610                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4611                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4612                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4613                 </links>
4614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4615                         <actions>
4616                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4617                                         <context link="subscription" field="owning_lib" />
4618                                 </create>
4619                                 <retrieve/>
4620                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4621                                         <context link="subscription" field="owning_lib" />
4622                                 </update>
4623                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4624                                         <context link="subscription" field="owning_lib" />
4625                                 </delete>
4626                         </actions>
4627                 </permacrud>
4628         </class>
4629
4630         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4631                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4632                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4633                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4634                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4635                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4636                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4637                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4638                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4639                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4640                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4641                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4642                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4643                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4644                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4645                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4646                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4647                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4648                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4649                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4650                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4651                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4652                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4653                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4654                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4655                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4656                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4657                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4658                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4659                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4660                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4661                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4662                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4663                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4664                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4665                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4666                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4667                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4668                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4669                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4670                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4671                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4672                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4673                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4674                 </fields>
4675                 <links>
4676                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4677                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4678                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4679                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4680                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4681                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4682                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4683                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4684                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4685                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4686                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4687                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4688                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4689                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4690                 </links>
4691                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4692                         <actions>
4693                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4694                                 <retrieve/>
4695                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4696                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4697                         </actions>
4698                 </permacrud>
4699         </class>
4700
4701         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4702                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4703                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4704                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4705                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4706                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4707                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4708                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4709                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4710                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4711                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4712                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4713                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4714                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4715                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4716                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4717                 </fields>
4718                 <links>
4719                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4720                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4721                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4722                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4723                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4724                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4725                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4726                 </links>
4727                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4728                         <actions>
4729                                 <create permission="ADMIN_SERIAL_ITEM">
4730                                         <context link="stream" jump="distribution" field="holding_lib" />
4731                                 </create>
4732                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4733                                         <context link="stream" jump="distribution" field="holding_lib" />
4734                                 </retrieve>
4735                                 <update permission="ADMIN_SERIAL_ITEM">
4736                                         <context link="stream" jump="distribution" field="holding_lib" />
4737                                 </update>
4738                                 <delete permission="ADMIN_SERIAL_ITEM">
4739                                         <context link="stream" jump="distribution" field="holding_lib" />
4740                                 </delete>
4741                         </actions>
4742                 </permacrud>
4743         </class>
4744
4745         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4746                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4747                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4748                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4749                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4750                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4751                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4752                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4753                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4754                 </fields>
4755                 <links>
4756                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4757                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4758                 </links>
4759                 <!-- Not available via PCRUD at this time -->
4760         </class>
4761         <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">
4762                 <fields>
4763                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4764                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4765                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4766                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4767                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4768                 </fields>
4769                 <links>
4770                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4771                 </links>
4772         </class>
4773         <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">
4774                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4775                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4776                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4777                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4778                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4779                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4780                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4781                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4782                 </fields>
4783                 <links>
4784                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4785                 </links>
4786         </class>
4787         <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">
4788                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4789                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4790                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4791                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4792                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4793                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4794                 </fields>
4795                 <links>
4796                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4797                 </links>
4798                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4799                         <actions>
4800                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4801                                         <context link="distribution" field="holding_lib" />
4802                                 </create>
4803                                 <retrieve/>
4804                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4805                                         <context link="distribution" field="holding_lib" />
4806                                 </update>
4807                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4808                                         <context link="distribution" field="holding_lib" />
4809                                 </delete>
4810                         </actions>
4811                 </permacrud>
4812         </class>
4813
4814         <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">
4815                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4816                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4817                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4818                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4819                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4820                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4821                 </fields>
4822                 <links>
4823                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4824                 </links>
4825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4826                         <actions>
4827                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4828                                         <context link="distribution" field="holding_lib" />
4829                                 </create>
4830                                 <retrieve/>
4831                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4832                                         <context link="distribution" field="holding_lib" />
4833                                 </update>
4834                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4835                                         <context link="distribution" field="holding_lib" />
4836                                 </delete>
4837                         </actions>
4838                 </permacrud>
4839         </class>
4840
4841         <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">
4842                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4843                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4844                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4845                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4846                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4847                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4848                 </fields>
4849                 <links>
4850                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4851                 </links>
4852                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4853                         <actions>
4854                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4855                                         <context link="distribution" field="holding_lib" />
4856                                 </create>
4857                                 <retrieve/>
4858                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4859                                         <context link="distribution" field="holding_lib" />
4860                                 </update>
4861                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4862                                         <context link="distribution" field="holding_lib" />
4863                                 </delete>
4864                         </actions>
4865                 </permacrud>
4866         </class>
4867
4868         <class id="ascecm" controller="open-ils.cstore" 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">
4869                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4870                         <field name="id" reporter:datatype="id" />
4871                         <field name="owning_copy" reporter:datatype="link"/>
4872                         <field name="stat_cat" reporter:datatype="link"/>
4873                         <field name="stat_cat_entry" reporter:datatype="link"/>
4874                 </fields>
4875                 <links>
4876                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4877                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4878                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4879                 </links>
4880         </class>
4881         <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">
4882                 <fields oils_persist:primary="code">
4883                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4884                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4885                 </fields>
4886                 <links/>
4887         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4888             <actions>
4889                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4890                 <retrieve/>
4891                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4892                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4893             </actions>
4894         </permacrud>
4895         </class>
4896         <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">
4897                 <fields oils_persist:primary="code">
4898                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4899                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4900                 </fields>
4901                 <links/>
4902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4903             <actions>
4904                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4905                 <retrieve/>
4906                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4907                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4908             </actions>
4909         </permacrud>
4910         </class>
4911         <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">
4912                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4913                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4914                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4915                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4916                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4917                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4918                 </fields>
4919                 <links>
4920             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4921         </links>
4922         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4923             <actions>
4924                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4925                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4926                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4927                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4928             </actions>
4929         </permacrud>
4930         </class>
4931         <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">
4932                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4933                         <field name="id" reporter:datatype="id" />
4934                         <field name="name" reporter:datatype="text"/>
4935                 </fields>
4936                 <links/>
4937         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4938             <actions>
4939                 <create permission="CREATE_LASSO" global_required="true"/>
4940                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4941                 <update permission="UPDATE_LASSO" global_required="true"/>
4942                 <delete permission="DELETE_LASSO" global_required="true"/>
4943             </actions>
4944         </permacrud>
4945         </class>
4946         <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">
4947                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4948                         <field name="id" reporter:datatype="id" />
4949                         <field name="lasso" reporter:datatype="link"/>
4950                         <field name="org_unit" reporter:datatype="org_unit"/>
4951                 </fields>
4952                 <links>
4953                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4954                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4955                 </links>
4956         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4957             <actions>
4958                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4959                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4960                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4961                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4962             </actions>
4963         </permacrud>
4964         </class>
4965         <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">
4966                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4967                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4968                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4969                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4970                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4971                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4972                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4973                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4974                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4975                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4976                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4977                 </fields>
4978                 <links>
4979                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4980                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4981                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4982                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4983                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4984                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4985                 </links>
4986         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4987             <actions>
4988                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4989                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4990                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4991                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4992             </actions>
4993         </permacrud>
4994         </class>
4995         <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">
4996                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4997                         <field name="id" reporter:datatype="id" />
4998                         <field name="from_org" reporter:datatype="org_unit"/>
4999                         <field name="to_org" reporter:datatype="org_unit"/>
5000                         <field name="prox" reporter:datatype="int" />
5001                 </fields>
5002                 <links>
5003                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5004                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5005                 </links>
5006         </class>
5007         <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">
5008                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5009                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5010                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5011                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5012                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5013                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5014                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5015                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5016                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5017                 </fields>
5018                 <links/>
5019         </class>
5020         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5021                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5022                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5023                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5024                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5025                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5026                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5027                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5028                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5029                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5030                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5031                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5032                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5033                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5034                 </fields>
5035                 <links>
5036                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5037                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5038                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5039                 </links>
5040         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5041             <actions>
5042                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5043                 <retrieve/>
5044                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5045                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5046             </actions>
5047         </permacrud>
5048         </class>
5049         <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">
5050                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5051                         <field name="address_type"  reporter:datatype="text"/>
5052                         <field name="city"  reporter:datatype="text"/>
5053                         <field name="country"  reporter:datatype="text"/>
5054                         <field name="county"  reporter:datatype="text"/>
5055                         <field name="id" reporter:datatype="id" />
5056                         <field name="org_unit" reporter:datatype="org_unit"/>
5057                         <field name="post_code"  reporter:datatype="text"/>
5058                         <field name="state"  reporter:datatype="text"/>
5059                         <field name="street1"  reporter:datatype="text"/>
5060                         <field name="street2"  reporter:datatype="text"/>
5061                         <field name="valid" reporter:datatype="bool"/>
5062                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5063                 </fields>
5064                 <links>
5065                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5066                 </links>
5067         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5068             <actions>
5069                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5070                 <retrieve/>
5071                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5072                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5073             </actions>
5074         </permacrud>
5075         </class>
5076         <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">
5077                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5078                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5079                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5080                         <field name="query_text" reporter:datatype="text"/>
5081                 </fields>
5082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5083             <actions>
5084                 <retrieve/>
5085             </actions>
5086         </permacrud>
5087         </class>
5088
5089         <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">
5090                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5091                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5092                         <field name="owner" reporter:datatype="org_unit"/>
5093                         <field name="code" reporter:datatype="text"/>
5094                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5095                         <field name="create_date" reporter:datatype="timestamp"/>
5096                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5097                 </fields>
5098                 <links>
5099                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5100                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5101                 </links>
5102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5103             <actions>
5104                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5105                 <retrieve/>
5106                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5107                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5108             </actions>
5109         </permacrud>
5110         </class>
5111         <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">
5112                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5113                         <field name="id" reporter:datatype="id"/>
5114                         <field name="grp" reporter:datatype="link"/>
5115                         <field name="pos" reporter:datatype="int"/>
5116                         <field name="query" reporter:datatype="link"/>
5117                 </fields>
5118                 <links>
5119                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5120                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5121                 </links>
5122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5123             <actions>
5124                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5125                     <context link="grp" field="owner"/>
5126                 </create>
5127                 <retrieve/>
5128                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5129                     <context link="grp" field="owner"/>
5130                 </update>
5131                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5132                     <context link="grp" field="owner"/>
5133                 </delete>
5134             </actions>
5135         </permacrud>
5136         </class>
5137
5138         <!-- A note: Please update alhr and ahopl when updating ahr -->
5139         <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">
5140                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5141                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5142                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5143                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5144                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5145                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5146                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5147                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5148                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5149                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5150                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5151                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5152                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5153                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5154                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5155                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5156                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5157                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5158                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5159                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5160                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5161                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5162                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5163                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5164                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5165                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5166                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5167                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5168                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5169                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5170                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5171                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5172                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5173                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5174                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5175                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5176                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5177                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5178                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5180                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5181                 </fields>
5182                 <links>
5183                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5184                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5185                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5186                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5187                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5188                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5189                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5190                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5191                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5192                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5193                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5194                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5195                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5196                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5197                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5198                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5199                 </links>
5200                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5201                         <actions>
5202                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5203                         </actions>
5204                 </permacrud>
5205         </class>
5206         <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">
5207                 <oils_persist:source_definition><![CDATA[
5208                 SELECT
5209                         ahr.*,
5210                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5211                                 copy_location_order_position,
5212                         CASE WHEN au.alias IS NOT NULL THEN
5213                                 au.alias
5214                         ELSE
5215                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5216                                         COALESCE(au.family_name, ''),
5217                                         COALESCE(au.suffix, ''),
5218                                         ', ',
5219                                         COALESCE(au.prefix, ''),
5220                                         COALESCE(au.first_given_name, ''),
5221                                         COALESCE(au.second_given_name, '')
5222                                 ], ' '), E'\\s+,', ',')
5223                         END AS usr_display_name,
5224                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5225                                 AS call_number_label,
5226                         siss.label AS issuance_label,
5227                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5228                         ahcm_1.copy_count AS potential_copies
5229                 FROM action.hold_request ahr
5230                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5231                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5232                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5233                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5234                 JOIN actor.usr au ON (au.id = ahr.usr)
5235                 JOIN (
5236                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5237                         FROM asset.copy_location
5238                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5239                 LEFT JOIN actor.usr_standing_penalty ausp 
5240                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5241                 LEFT JOIN config.standing_penalty csp
5242                         ON (
5243                                 csp.id = ausp.standing_penalty AND 
5244                                 csp.block_list LIKE '%CAPTURE%' AND (
5245                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5246                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5247                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5248                                         )
5249                                 )
5250                         )
5251                 JOIN (
5252                         SELECT COUNT(target_copy) AS copy_count, hold
5253                         FROM action.hold_copy_map
5254                         GROUP BY 2
5255                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5256                 LEFT JOIN serial.issuance siss
5257                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5258                 LEFT JOIN asset.copy_location_order acplo
5259                         ON (acp.location = acplo.location AND
5260                                 acp.circ_lib = acplo.org)
5261                 WHERE
5262                         ahr.capture_time IS NULL AND
5263                         ahr.cancel_time IS NULL AND
5264                         csp.id IS NULL AND
5265                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5266                 ]]></oils_persist:source_definition>
5267                 <fields oils_persist:primary="id">
5268                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5269                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5270                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5271                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5272                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5273                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5274                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5275                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5276                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5277                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5278                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5279                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5280                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5281                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5282                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5283                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5284                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5285                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5286                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5287                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5288                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5289                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5290                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5291                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5292                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5293                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5294                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5295                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5296                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5297                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5298                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5299                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5300                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5301                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5302                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5303                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5304                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5305                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5306                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5307                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5308                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5309                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5310                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5311                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5312                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5313                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5314                 </fields>
5315                 <links>
5316                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5317                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5318                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5319                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5320                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5321                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5322                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5323                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5324                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5325                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5326                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5327                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5328                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5329                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5330                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5331                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5332                 </links>
5333                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5334                         <actions>
5335                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5336                         </actions>
5337                 </permacrud>
5338         </class>
5339         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5340                 <oils_persist:source_definition>
5341                         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)
5342                 </oils_persist:source_definition>
5343                 <fields oils_persist:primary="id">
5344                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5345                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5346                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5347                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5348                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5349                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5350                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5351                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5352                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5353                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5354                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5355                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5356                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5357                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5358                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5359                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5360                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5361                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5362                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5363                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5364                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5365                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5366                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5367                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5368                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5369                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5370                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5371                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5372                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5373                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5374                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5375                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5376                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5377                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5378                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5379                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5380                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5381                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5382                 </fields>
5383                 <links>
5384                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5385                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5386                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5387                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5388                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5389                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5390                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5391                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5392                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5393                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5394                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5395                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5396                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5397                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5398                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5399                 </links>
5400         </class>
5401
5402         <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">
5403                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5404                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5405                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5406                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5407                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5408                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5409                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5410                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5411                 </fields>
5412                 <links>
5413                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5414                 </links>
5415                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5416                         <actions>
5417                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5418                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5419                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5420                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5421                         </actions>
5422                 </permacrud>
5423         </class>
5424         <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">
5425                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5426                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5427                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5428                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5429                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5430                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5431                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5432                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5433                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5434                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5435                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5436                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5437                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5438                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5439                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5440                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5441                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5442                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5443                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5444                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5445                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5446                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5447                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5448                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5449                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5450                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5451                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5452                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5453                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5454                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5455                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5456                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5457                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5458                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5459                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5460                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5461                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5462                 </fields>
5463                 <links>
5464                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5465                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5466                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5467                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5468                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5469                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5470                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5471                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5472                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5473                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5474                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5475                 </links>
5476                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5477                         <actions>
5478                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5479                         </actions>
5480                 </permacrud>
5481         </class>
5482         <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">
5483                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5484                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5485                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5486                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5487                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5488                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5489                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5490                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5491                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5492                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5493                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5494                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5495                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5496                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5497                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5498                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5499                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5500                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5501                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5502                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5503                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5504                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5505                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5506                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5507                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5508                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5509                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5510                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5511                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5512                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5513                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5514                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5515                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5516                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5517                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5518                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5519                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5520                 </fields>
5521                 <links>
5522                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5523                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5524                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5525                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5526                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5527                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5528                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5529                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5530                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5531                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5532                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5533                 </links>
5534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5535                         <actions>
5536                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5537                         </actions>
5538                 </permacrud>
5539         </class>
5540
5541         <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">
5542                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5543                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5544                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5545                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5546                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5547                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5548                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5549                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5550                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5551                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5552                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5553                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5554                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5555                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5556                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5557                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5558                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5559                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5560                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5561                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5562                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5563                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5564                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5565                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5566                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5567                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5568                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5569                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5570                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5571                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5572                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5573                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5574                 </fields>
5575                 <links>
5576                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5577                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5578                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5579                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5580                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5581                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5582                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5583                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5584                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5585                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5586                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5587                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5588                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5589                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5590                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5591                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5592                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5593                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5594                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5595                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5596                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5597                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5598                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5599                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5600                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5601                 </links>
5602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5603             <actions>
5604                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5605                 <retrieve />
5606                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5607                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5608             </actions>
5609         </permacrud>
5610         </class>
5611         <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">
5612                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5613                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5614                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5615                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5616                 </fields>
5617                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5618                         <actions>
5619                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5620                                 <retrieve/>
5621                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5622                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5623                         </actions>
5624                 </permacrud>
5625         </class>
5626         <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">
5627                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5628                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5629                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5630                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5631                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5632                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5633                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5634                 </fields>
5635                 <links>
5636                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5637                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5638                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5639                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5640                 </links>
5641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5642                         <actions>
5643                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5644                                 <retrieve/>
5645                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5646                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5647                         </actions>
5648                 </permacrud>
5649         </class>
5650         <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">
5651                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5652                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5653                         <field name="btype" reporter:datatype="text"/>
5654                         <field name="id" reporter:datatype="id" />
5655                         <field name="name"  reporter:datatype="text"/>
5656                         <field name="description" reporter:datatype="text"/>
5657                         <field name="owner" reporter:datatype="link"/>
5658                         <field name="pub" reporter:datatype="bool"/>
5659                         <field name="create_time" reporter:datatype="timestamp" />
5660                 </fields>
5661                 <links>
5662                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5663                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5664                 </links>
5665         </class>
5666         <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">
5667                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5668                         <field name="id" reporter:datatype="id" />
5669                         <field name="bucket" reporter:datatype="link"/>
5670                         <field name="note" reporter:datatype="text" />
5671                 </fields>
5672                 <links>
5673                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5674                 </links>
5675         </class>
5676         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5677                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5678                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5679                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5680                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5681                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5682                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5683                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5684                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5685                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5686                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5687                 </fields>
5688                 <links>
5689                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5690                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5691                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5692                 </links>
5693         </class>
5694         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5695                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5696                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5697                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5698                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5699                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5700                 </fields>
5701                 <links>
5702                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5703                 </links>
5704                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5705                         <actions>
5706                                 <retrieve permission="VIEW_USER">
5707                                         <context link="usr" field="home_ou" />
5708                                 </retrieve>
5709                         </actions>
5710                 </permacrud>
5711         </class>
5712     <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">
5713         <fields oils_persist:primary="field">
5714             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5715             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5716             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5717         </fields>
5718         <links/>
5719         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5720             <actions>
5721                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5722                 <retrieve />
5723                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5724                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5725             </actions>
5726         </permacrud>
5727     </class>
5728         <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">
5729                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5730                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5731                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5732                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5733                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5734                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5735                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5736                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5737                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5738                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5739                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5740                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5741                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5742                 </fields>
5743                 <links>
5744                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5745                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5746                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5747                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5748                 </links>
5749         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5750             <actions>
5751                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5752                 <retrieve />
5753                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5754                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5755             </actions>
5756         </permacrud>
5757         </class>
5758         <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">
5759                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5760                         <field name="field" reporter:datatype="link"/>
5761                         <field name="id" reporter:datatype="id" />
5762                         <field name="source" reporter:datatype="link"/>
5763                         <field name="value"  reporter:datatype="text"/>
5764                 </fields>
5765                 <links>
5766                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5767                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5768                 </links>
5769         </class>
5770         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5771                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5772                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5773                         <field name="btype" reporter:datatype="text"/>
5774                         <field name="id" reporter:datatype="id" />
5775                         <field name="name"  reporter:datatype="text"/>
5776                         <field name="description" reporter:datatype="text"/>
5777                         <field name="owner" reporter:datatype="link"/>
5778                         <field name="pub" reporter:datatype="bool"/>
5779                         <field name="create_time" reporter:datatype="timestamp" />
5780                 </fields>
5781                 <links>
5782                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5783                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5784                 </links>
5785         </class>
5786         <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">
5787                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5788                         <field name="id" reporter:datatype="id" />
5789                         <field name="bucket" reporter:datatype="link"/>
5790                         <field name="note" reporter:datatype="text" />
5791                 </fields>
5792                 <links>
5793                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5794                 </links>
5795         </class>
5796         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5797                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5798                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5799                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5800                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5801                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5802                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5803                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5804                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5805                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5806                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5807                 </fields>
5808                 <links>
5809                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5810                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5811                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5812                 </links>
5813         </class>
5814         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5815                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5816                         <field name="id" reporter:datatype="id" />
5817                         <field name="ind1" />
5818                         <field name="ind2" />
5819                         <field name="record" />
5820                         <field name="subfield" />
5821                         <field name="tag" />
5822                         <field name="value" />
5823                 </fields>
5824                 <links>
5825                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5826                 </links>
5827         </class>
5828         <class id="cnct" controller="open-ils.cstore" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
5829                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5830                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5831                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5832                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5833                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5834                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5835                 </fields>
5836                 <links>
5837                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5838                 </links>
5839         </class>
5840         <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">
5841                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5842                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5843                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5844                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5845                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5846                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5847                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5848                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5849                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5850                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5851                 </fields>
5852                 <links>
5853                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5854                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5855                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5856                 </links>
5857         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5858             <actions>
5859                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5860                 <retrieve/>
5861                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5862                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5863             </actions>
5864         </permacrud>
5865         </class>
5866         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5867                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5868                         <field name="create_date" reporter:datatype="timestamp"/>
5869                         <field name="creator" reporter:datatype="link"/>
5870                         <field name="edit_date" reporter:datatype="timestamp"/>
5871                         <field name="editor" reporter:datatype="link"/>
5872                         <field name="id" reporter:datatype="id" />
5873                         <field name="pub" reporter:datatype="bool"/>
5874                         <field name="record" reporter:datatype="link"/>
5875                         <field name="value"  reporter:datatype="text"/>
5876                 </fields>
5877                 <links>
5878                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5879                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5880                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5881                 </links>
5882         </class>
5883         <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">
5884                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5885                         <field name="balance_owed" reporter:datatype="money" />
5886                         <field name="total_owed" reporter:datatype="money" />
5887                         <field name="total_paid" reporter:datatype="money" />
5888                         <field name="usr" reporter:datatype="link"/>
5889                 </fields>
5890                 <links>
5891                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5892                 </links>
5893         </class>
5894         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5895                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5896                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5897                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5898                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5899                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5900                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5901                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5902                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5903                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5904                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5905                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5906                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5907                 </fields>
5908                 <links>
5909                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5910                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5911                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5912                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5913                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5914                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5915                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5916                 </links>
5917         </class>
5918         <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">
5919                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5920                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5921                         <field name="quality" reporter:datatype="int" />
5922                         <field name="source" reporter:datatype="text"/>
5923                         <field name="transcendant" reporter:datatype="bool"/>
5924                         <field name="can_have_copies" reporter:datatype="bool"/>
5925                 </fields>
5926                 <links/>
5927         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5928             <actions>
5929                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5930                 <retrieve/>
5931                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5932                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5933             </actions>
5934         </permacrud>
5935         </class>
5936         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5937                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5938                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5939                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5940                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5941                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5942                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5943                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5944                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5945                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5946                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5947                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5948                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5949                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5950                 </fields>
5951                 <links>
5952                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5953                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5954                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5955                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5956                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5957                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5958                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5959                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5960                 </links>
5961         </class>
5962         <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">
5963                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5964                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5965                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5966                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5967                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5968                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5969                 </fields>
5970                 <links>
5971                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5972                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5973                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5974                 </links>
5975         </class>
5976         <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">
5977                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5978                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5979                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5980                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5981                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5982                 </fields>
5983                 <links>
5984                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5985                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5986                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5987                 </links>
5988         </class>
5989         <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">
5990                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5991                         <field name="bucket" reporter:datatype="link"/>
5992                         <field name="id" reporter:datatype="id" />
5993                         <field name="target_user" reporter:datatype="link"/>
5994                         <field name="create_time" reporter:datatype="timestamp" />
5995                         <field name="pos" reporter:datatype="int" />
5996                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5997                 </fields>
5998                 <links>
5999                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6000                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6001             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6002                 </links>
6003         </class>
6004         <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">
6005                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6006                         <field name="id" reporter:datatype="id" />
6007                         <field name="item" reporter:datatype="link"/>
6008                         <field name="note" reporter:datatype="text" />
6009                 </fields>
6010                 <links>
6011                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6012                 </links>
6013         </class>
6014         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6015                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6016                         <field name="balance_owed" reporter:datatype="money" />
6017                         <field name="total_owed" reporter:datatype="money" />
6018                         <field name="total_paid" reporter:datatype="money" />
6019                         <field name="usr" reporter:datatype="link"/>
6020                 </fields>
6021                 <links>
6022                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6023                 </links>
6024         </class>
6025         <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">
6026                 <fields oils_persist:primary="code" oils_persist:sequence="">
6027                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6028                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6029                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6030                 </fields>
6031                 <links/>
6032         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6033             <actions>
6034                 <create permission="CREATE_MARC_CODE" global_required="true"/>
6035                 <retrieve/>
6036                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6037                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6038             </actions>
6039         </permacrud>
6040         </class>
6041         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6042                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6043                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6044                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6045                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6046                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6047                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6048                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6049                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6050                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6051                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6052                 </fields>
6053                 <links>
6054                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6055                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6056                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6057                 </links>
6058         </class>
6059         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6060                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6061                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6062                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6063                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6064                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6065                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6066                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6067                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6068                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6069                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6070                 </fields>
6071                 <links>
6072                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6073                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6074                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6075                 </links>
6076         </class>
6077         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6078                 <fields oils_persist:primary="id" oils_persist:sequence="">
6079                         <field name="checkin_lib" reporter:datatype="link"/>
6080                         <field name="checkin_staff" reporter:datatype="link"/>
6081                         <field name="checkin_time" reporter:datatype="timestamp"/>
6082                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6083                         <field name="circ_staff" reporter:datatype="link"/>
6084                         <field name="desk_renewal" reporter:datatype="bool"/>
6085                         <field name="due_date" reporter:datatype="timestamp"/>
6086                         <field name="duration" reporter:datatype="interval"/>
6087                         <field name="duration_rule" reporter:datatype="link"/>
6088                         <field name="fine_interval" reporter:datatype="interval"/>
6089                         <field name="id" reporter:datatype="id" />
6090                         <field name="max_fine" reporter:datatype="money" />
6091                         <field name="max_fine_rule" reporter:datatype="link"/>
6092                         <field name="opac_renewal" reporter:datatype="bool"/>
6093                         <field name="phone_renewal" reporter:datatype="bool"/>
6094                         <field name="recurring_fine" reporter:datatype="money" />
6095                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6096                         <field name="renewal_remaining" reporter:datatype="int" />
6097             <field name="grace_period" reporter:datatype="interval" />
6098                         <field name="stop_fines" reporter:datatype="text"/>
6099                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6100                         <field name="target_copy" reporter:datatype="link"/>
6101                         <field name="usr" reporter:datatype="link"/>
6102                         <field name="xact_finish" reporter:datatype="timestamp" />
6103                         <field name="xact_start" reporter:datatype="timestamp" />
6104                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6105                 </fields>
6106                 <links>
6107                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6108                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6109                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6110                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6111                 </links>
6112         </class>
6113         <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">
6114                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6115                         <field name="field" reporter:datatype="link"/>
6116                         <field name="id" reporter:datatype="id" />
6117                         <field name="source" reporter:datatype="link"/>
6118                         <field name="value" reporter:datatype="text"/>
6119                 </fields>
6120                 <links>
6121                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6122                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6123                 </links>
6124         </class>
6125         <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">
6126                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6127                         <field name="high" reporter:datatype="money" />
6128                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6129                         <field name="low" reporter:datatype="money" />
6130                         <field name="name" reporter:datatype="text"/>
6131                         <field name="normal" reporter:datatype="money" />
6132                         <field name="recurrence_interval" reporter:datatype="interval"/>
6133             <field name="grace_period" reporter:datatype="interval" />
6134                 </fields>
6135                 <links/>
6136         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6137             <actions>
6138                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6139                 <retrieve/>
6140                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6141                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6142             </actions>
6143         </permacrud>
6144         </class>
6145         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6146                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6147                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6148                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6149                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6150                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6151                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6152                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6153                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6154                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6155                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6156                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6157                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6158                 </fields>
6159                 <links>
6160                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6161                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6162                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6163                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6164                 </links>
6165         </class>
6166         <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">
6167                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6168                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6169                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6170                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6171                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6172                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6173                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6174                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6175                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6176                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6177                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6178                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6179                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6180                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6181                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6182                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6183                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6184                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6185                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6186                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6187                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6188                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6189                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6190                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6191                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6192                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6193                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6194                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6195                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6196                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6197                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6198                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6199                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6200                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6201                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6202                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6203                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6204                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6205                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6206                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6207                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6208                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6209                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6210                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6211                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6212                 </fields>
6213                 <links>
6214                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6215                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6216                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6217                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6218                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6219                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6220                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6221                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6222                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6223                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6224                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6225                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6226                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6227                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6228                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6229                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6230                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6231                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6232                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6233                 </links>
6234         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6235             <actions>
6236                 <create permission="CREATE_COPY">
6237                     <context link="call_number" field="owning_lib"/>
6238                 </create>
6239                 <retrieve/>
6240                 <update permission="UPDATE_COPY">
6241                     <context link="call_number" field="owning_lib"/>
6242                 </update>
6243                 <delete permission="DELETE_COPY">
6244                     <context link="call_number" field="owning_lib"/>
6245                 </delete>
6246             </actions>
6247         </permacrud>
6248         </class>
6249
6250         <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">
6251                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6252                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6253                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6254                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6255                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6256                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6257                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6258                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6259                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6260                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6261                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6262                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6263                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6264                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6265                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6266                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6267                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6268                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6269                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6270                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6271                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6272                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6273                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6274                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6275                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6276                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6277                 </fields>
6278                 <links>
6279                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6280                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6281                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6282                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6283                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6284                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6285                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6286                 </links>
6287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6288                         <actions>
6289                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6290                                 <retrieve />
6291                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6292                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6293                         </actions>
6294                 </permacrud>
6295         </class>
6296
6297         <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">
6298                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6299                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6300                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6301                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6302                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6303                 </fields>
6304                 <links/>
6305         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6306             <actions>
6307                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6308                 <retrieve/>
6309                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6310                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6311             </actions>
6312         </permacrud>
6313         </class>
6314         <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">
6315                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6316                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6317                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6318                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6319                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6320                 </fields>
6321                 <links/>
6322         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6323             <actions>
6324                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6325                 <retrieve/>
6326                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6327                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6328             </actions>
6329         </permacrud>
6330         </class>
6331         <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">
6332                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6333                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6334                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6335                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6336                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6337                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6338                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6339                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6340                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6341                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6342                 </fields>
6343                 <links>
6344                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6345                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6346                 </links>
6347         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6348             <actions>
6349                 <create permission="CREATE_PERM" global_required="true"/>
6350                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6351                 <update permission="UPDATE_PERM" global_required="true"/>
6352                 <delete permission="DELETE_PERM" global_required="true"/>
6353             </actions>
6354         </permacrud>
6355         </class>
6356         <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">
6357                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6358                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6359                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6360                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6361                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6362                 </fields>
6363                 <links>
6364                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6365                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6366                 </links>
6367         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6368             <actions>
6369                 <create permission="ADMIN_SURVEY">
6370                     <context link="question" jump="survey" field="owner"/>
6371                 </create>
6372                 <retrieve/>
6373                 <update permission="ADMIN_SURVEY">
6374                     <context link="question" jump="survey" field="owner"/>
6375                 </update>
6376                 <delete permission="ADMIN_SURVEY">
6377                     <context link="question" jump="survey" field="owner"/>
6378                 </delete>
6379             </actions>
6380         </permacrud>
6381         </class>
6382         <class id="ancc" controller="open-ils.cstore" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6383                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6384                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6385                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6386                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6387                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6388                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6389                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6390                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6391                 </fields>
6392                 <links>
6393                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6394                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6395                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6396                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6397                 </links>
6398         </class>
6399         <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">
6400                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6401                         <field name="balance_owed" reporter:datatype="money" />
6402                         <field name="total_owed" reporter:datatype="money" />
6403                         <field name="total_paid" reporter:datatype="money" />
6404                         <field name="usr" reporter:datatype="link"/>
6405                 </fields>
6406                 <links>
6407                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6408                 </links>
6409         </class>
6410         <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">
6411                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6412                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6413                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6414                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6415                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6416                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6417                 </fields>
6418                 <links>
6419                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6420                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6421                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6422                 </links>
6423         </class>
6424         <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">
6425                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6426                         <field name="field" reporter:datatype="link"/>
6427                         <field name="id" reporter:datatype="id" />
6428                         <field name="source" reporter:datatype="link"/>
6429                         <field name="value" reporter:datatype="text"/>
6430                 </fields>
6431                 <links>
6432                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6433                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6434                 </links>
6435         </class>
6436         <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">
6437                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6438                         <field name="field" reporter:datatype="link"/>
6439                         <field name="id" reporter:datatype="id" />
6440                         <field name="source" reporter:datatype="link"/>
6441                         <field name="value" reporter:datatype="text"/>
6442                 </fields>
6443                 <links>
6444                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6445                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6446                 </links>
6447         </class>
6448         <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">
6449                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6450                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6451                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6452                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6453                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6454                 </fields>
6455                 <links>
6456                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6457                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6458                 </links>
6459         </class>
6460         <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">
6461                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6462                         <field name="depth" reporter:datatype="int" />
6463                         <field name="grantable" reporter:datatype="bool"/>
6464                         <field name="grp" reporter:datatype="link"/>
6465                         <field name="id" reporter:datatype="id" />
6466                         <field name="perm" reporter:datatype="link"/>
6467                 </fields>
6468                 <links>
6469                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6470                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6471                 </links>
6472         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6473             <actions>
6474                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6475                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6476                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6477                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6478             </actions>
6479         </permacrud>
6480         </class>
6481         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6482                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6483                         <field name="items" oils_persist:virtual="true" />
6484                         <field name="btype" reporter:datatype="text"/>
6485                         <field name="id" reporter:datatype="id" />
6486                         <field name="name" reporter:datatype="text"/>
6487                         <field name="description" reporter:datatype="text"/>
6488                         <field name="owner" reporter:datatype="link"/>
6489                         <field name="pub" reporter:datatype="bool"/>
6490                         <field name="create_time" reporter:datatype="timestamp" />
6491                 </fields>
6492                 <links>
6493                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6494                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6495                 </links>
6496         </class>
6497         <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">
6498                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6499                         <field name="id" reporter:datatype="id" />
6500                         <field name="bucket" reporter:datatype="link"/>
6501                         <field name="note" reporter:datatype="text" />
6502                 </fields>
6503                 <links>
6504                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6505                 </links>
6506         </class>
6507         <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">
6508                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6509                         <field name="id" reporter:datatype="int" />
6510                         <field name="usr" reporter:datatype="link"/>
6511                         <field name="work_ou" reporter:datatype="link"/>
6512                 </fields>
6513                 <links>
6514                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6515                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6516                 </links>
6517         </class>
6518         <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">
6519                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6520                         <field name="depth" reporter:datatype="int"/>
6521                         <field name="grantable" reporter:datatype="bool"/>
6522                         <field name="id" reporter:datatype="id" />
6523                         <field name="perm" reporter:datatype="link"/>
6524                         <field name="usr" reporter:datatype="link"/>
6525                 </fields>
6526                 <links>
6527                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6528                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6529                 </links>
6530         </class>
6531         <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">
6532                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6533                         <field name="object_id" reporter:datatype="text"/>
6534                         <field name="grantable" reporter:datatype="bool"/>
6535                         <field name="id" reporter:datatype="id" />
6536                         <field name="perm" reporter:datatype="link"/>
6537                         <field name="usr" reporter:datatype="link"/>
6538                         <field name="object_type" reporter:datatype="text"/>
6539                 </fields>
6540                 <links>
6541                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6542                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6543                 </links>
6544         </class>
6545         <class id="mp" controller="open-ils.cstore" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
6546                 <fields oils_persist:primary="id" oils_persist:sequence="">
6547                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6548                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6549                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6550                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6551                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6552                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6553                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6554                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6555                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6556                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6557                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6558                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6559                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6560                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6561                 </fields>
6562                 <links>
6563                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6564                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6565                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6566                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6567                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6568                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6569                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6570                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6571                 </links>
6572         </class>
6573         <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">
6574                 <fields oils_persist:primary="id" oils_persist:sequence="">
6575                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6576                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6577                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6578                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6579                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6580                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6581                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6582                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6583                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6584                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6585                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6586                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6587                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6588                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6589                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6590                 </fields>
6591                 <links>
6592                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6593                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6594                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6595                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6596                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6597                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6598                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6599                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6600                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6601                 </links>
6602         </class>
6603         <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">
6604                 <fields oils_persist:primary="id" oils_persist:sequence="">
6605                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6606                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6607                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6608                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6609                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6610                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6611                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6612                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6613                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6614                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6615                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6616                 </fields>
6617                 <links>
6618                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6619                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6620                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6621                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6622                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6623                 </links>
6624         </class>
6625         <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">
6626                 <fields oils_persist:primary="id" oils_persist:sequence="">
6627                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6628                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6629                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6630                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6631                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6632                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6633                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
6634                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6635                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6636                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6637                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6638                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6639                 </fields>
6640                 <links>
6641                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6642                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6643                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6644                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6645                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6646                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6647                 </links>
6648         </class>
6649         <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">
6650                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6651                         <field name="bucket" reporter:datatype="link"/>
6652                         <field name="id" reporter:datatype="id" />
6653                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6654                         <field name="create_time" reporter:datatype="timestamp" />
6655                         <field name="pos" reporter:datatype="int" />
6656                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6657                 </fields>
6658                 <links>
6659                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6660                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6661             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6662                 </links>
6663         </class>
6664         <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">
6665                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6666                         <field name="id" reporter:datatype="id" />
6667                         <field name="item" reporter:datatype="link"/>
6668                         <field name="note" reporter:datatype="text" />
6669                 </fields>
6670                 <links>
6671                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6672                 </links>
6673         </class>
6674         <class id="asce" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat_entry" oils_persist:tablename="asset.stat_cat_entry" reporter:label="Item Stat Cat Entry">
6675                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6676                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6677                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6678                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6679                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6680                 </fields>
6681                 <links>
6682                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6683                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6684                 </links>
6685         </class>
6686     <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">
6687         <fields oils_persist:primary="field">
6688             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6689             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6690             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6691         </fields>
6692         <links/>
6693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6694             <actions>
6695                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6696                 <retrieve />
6697                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6698                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6699             </actions>
6700         </permacrud>
6701     </class>
6702         <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">
6703                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6704                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6705                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6706                 </fields>
6707                 <links/>
6708         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6709             <actions>
6710                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6711                 <retrieve/>
6712                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6713                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6714             </actions>
6715         </permacrud>
6716         </class>
6717
6718
6719         <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">
6720                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6721                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6722                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6723                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6724                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6725                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6726                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6727                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6728                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6729                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6730                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6731                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6732                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6733                 </fields>
6734                 <links>
6735                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6736                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6737                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6738                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6739                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6740                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6741                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6742                 </links>
6743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6744             <actions>
6745                 <create permission="TRANSIT_COPY">
6746                     <context link="target_copy" field="owner"/>
6747                 </create>
6748                 <retrieve/>
6749                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6750                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6751             </actions>
6752         </permacrud>
6753         </class>
6754         <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">
6755                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6756                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6757                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6758                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6759                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6760                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6761                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6762                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6763                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6764                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6765                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6766                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6767                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6768                 </fields>
6769                 <links>
6770                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6771                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6772                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6773                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6774                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6775                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6776                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6777                 </links>
6778         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6779             <actions>
6780                 <create permission="TRANSIT_COPY" context_field="owner">
6781                     <context link="target_copy" field="circ_lib"/>
6782                 </create>
6783                 <retrieve/>
6784                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6785                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6786             </actions>
6787         </permacrud>
6788         </class>
6789         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6790                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6791                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6792                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6793                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6794                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6795                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6796                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6797                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6798                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6799                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6800                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6801                 </fields>
6802                 <links>
6803                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6804                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6805                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6806                 </links>
6807         </class>
6808         <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">
6809                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6810                         <field name="grp" />
6811                         <field name="id" reporter:datatype="id" />
6812                         <field name="usr" />
6813                 </fields>
6814                 <links>
6815                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6816                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6817                 </links>
6818         </class>
6819         <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">
6820                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6821                         <field name="id" reporter:datatype="id" />
6822                         <field name="fq_field" reporter:datatype="text"/>
6823                         <field name="identity_value" reporter:datatype="text"/>
6824                         <field name="translation" reporter:datatype="text"/>
6825                         <field name="string" reporter:datatype="text"/>
6826                 </fields>
6827                 <links>
6828                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6829                 </links>
6830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6831             <actions>
6832                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6833                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6834                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6835                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6836             </actions>
6837         </permacrud>
6838         </class>
6839         <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">
6840                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6841                         <field name="id" reporter:datatype="id" />
6842                         <field name="fm_class" reporter:datatype="text"/>
6843                         <field name="field" reporter:datatype="text"/>
6844                         <field name="owner" reporter:datatype="org_unit"/>
6845                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6846                 </fields>
6847                 <links>
6848                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6849                 </links>
6850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6851             <actions>
6852                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6853                 <retrieve/>
6854                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6855                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6856             </actions>
6857         </permacrud>
6858         </class>
6859         <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">
6860                 <fields oils_persist:primary="code">
6861                         <field name="code" reporter:datatype="id" />
6862                         <field name="marc_code" reporter:datatype="text"/>
6863                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6864                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6865                 </fields>
6866                 <links/>
6867         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6868             <actions>
6869                 <create permission="CREATE_LOCALE" global_required="true"/>
6870                 <retrieve/>
6871                 <update permission="UPDATE_LOCALE" global_required="true"/>
6872                 <delete permission="DELETE_LOCALE" global_required="true"/>
6873             </actions>
6874         </permacrud>
6875         </class>
6876         <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">
6877                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6878                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6879                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6880                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6881             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6882                 </fields>
6883                 <links>
6884                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6885                 </links>
6886         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6887             <actions>
6888                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6889                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6890                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6891                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6892             </actions>
6893         </permacrud>
6894         </class>
6895
6896         <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">
6897                 <fields oils_persist:primary="id">
6898                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6899                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6900                 </fields>
6901                 <links/>
6902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6903             <actions>
6904                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6905                 <retrieve/>
6906                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6907                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6908             </actions>
6909         </permacrud>
6910         </class>
6911
6912         <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">
6913                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6914                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6915                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6916                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6917                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6918                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6919                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6920                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6921                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6922                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6923                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6924                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6925                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6926                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6927                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6928                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6929                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6930                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6931                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6932                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6933                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6934                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6935                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6936                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6937                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6938                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6939                 </fields>
6940                 <links>
6941                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6942                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6943                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6944                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6945                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6946                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6947                 </links>
6948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6949             <actions>
6950                 <create permission="user_request.create">
6951                     <context link="usr" field="home_ou"/>
6952                                 </create>
6953                 <retrieve permission="user_request.view">
6954                     <context link="usr" field="home_ou"/>
6955                                 </retrieve>
6956                 <update permission="user_request.update">
6957                     <context link="usr" field="home_ou"/>
6958                                 </update>
6959                 <delete permission="user_request.delete">
6960                     <context link="usr" field="home_ou"/>
6961                                 </delete>
6962             </actions>
6963         </permacrud>
6964         </class>
6965
6966         <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">
6967                 <fields oils_persist:primary="code">
6968                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6969                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6970                 </fields>
6971                 <links/>
6972         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6973             <actions>
6974                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6975                 <retrieve/>
6976                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6977                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6978             </actions>
6979         </permacrud>
6980         </class>
6981
6982         <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">
6983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6984                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6985                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6986                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6987                         <field reporter:label="Ratio" name="ratio" />
6988                 </fields>
6989                 <links>
6990                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6991                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6992                 </links>
6993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6994                         <actions>
6995                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6996                                 <retrieve/>
6997                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6998                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6999                         </actions>
7000                 </permacrud>
7001         </class>
7002
7003         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7004                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7005                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7006                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7007                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7008                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7009                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7010                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7011                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7012                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7013                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7014                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7015                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7016                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7017                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7018                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7019                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7020                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7021                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7022                 </fields>
7023                 <links>
7024                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7025                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7026             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7027             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7028             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7029                 </links>
7030         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7031             <actions>
7032                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7033                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7034                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7035                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7036             </actions>
7037         </permacrud>
7038         </class>
7039
7040         <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">
7041                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7042                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7043                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7044                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7045                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7046                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7047                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7048                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7049                 </fields>
7050                 <links>
7051                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7052                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7053                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7054                 </links>
7055         </class>
7056
7057         <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">
7058                 <fields oils_persist:primary="code">
7059                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7060                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7061                 </fields>
7062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7063             <actions>
7064                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7065                 <retrieve/>
7066                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7067                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7068             </actions>
7069                 </permacrud>
7070         </class>
7071
7072         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7073                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7074                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7075                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7076                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7077                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7078                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7079                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7080                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7081                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7082                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7083                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7084                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7085                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7086                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7087                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7088                 </fields>
7089                 <links>
7090                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7091                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7092                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7093                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7094                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7095                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7096                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7097                 </links>
7098         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7099             <actions>
7100                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7101                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7102                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7103                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7104             </actions>
7105         </permacrud>
7106         </class>
7107
7108         <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">
7109                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7110                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7111                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7112                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7113                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7114                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7115                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7116                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7117                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7118                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7119                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7120                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7121                 </fields>
7122                 <links>
7123                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7124                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7125                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7126                 </links>
7127         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7128             <actions>
7129                 <create   permission="ADMIN_INVOICE">
7130                                         <context link="invoice" field="receiver"/>
7131                                 </create>
7132                 <retrieve permission="ADMIN_INVOICE">
7133                                         <context link="invoice" field="receiver"/>
7134                                 </retrieve>
7135                 <update   permission="ADMIN_INVOICE">
7136                                         <context link="invoice" field="receiver"/>
7137                                 </update>
7138                                 <delete   permission="ADMIN_INVOICE">
7139                                         <context link="invoice" field="receiver"/>
7140                                 </delete>
7141             </actions>
7142         </permacrud>
7143         </class>
7144
7145         <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">
7146                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7147                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7148                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7149                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7150                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7151                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7152                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7153                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7154                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7155                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7156                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7157                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7158                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7159                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7160                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7161                 </fields>
7162                 <links>
7163                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7164                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7165                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7166                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7167                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7168                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7169                 </links>
7170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7171             <actions>
7172                 <create   permission="ADMIN_INVOICE">
7173                                         <context link="invoice" field="receiver"/>
7174                                 </create>
7175                 <retrieve permission="ADMIN_INVOICE">
7176                                         <context link="invoice" field="receiver"/>
7177                                 </retrieve>
7178                 <update   permission="ADMIN_INVOICE">
7179                                         <context link="invoice" field="receiver"/>
7180                                 </update>
7181                                 <delete   permission="ADMIN_INVOICE">
7182                                         <context link="invoice" field="receiver"/>
7183                                 </delete>
7184             </actions>
7185         </permacrud>
7186         </class>
7187
7188         <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">
7189                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7190                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7191                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7192                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7193                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7194                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7195                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7196                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7197                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7198                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7199                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7200                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7201                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7202                 </fields>
7203                 <links>
7204                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7205                 </links>
7206         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7207             <actions>
7208                 <create permission="ADMIN_PROVIDER">
7209                     <context link="provider" field="owner"/>
7210                 </create>
7211                 <retrieve permission="ADMIN_PROVIDER">
7212                     <context link="provider" field="owner"/>
7213                 </retrieve>
7214                 <update permission="ADMIN_PROVIDER">
7215                     <context link="provider" field="owner"/>
7216                 </update>
7217                 <delete permission="ADMIN_PROVIDER">
7218                     <context link="provider" field="owner"/>
7219                 </delete>
7220             </actions>
7221         </permacrud>
7222         </class>
7223
7224         <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">
7225                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7226                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7227                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7228                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7229                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7230                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7231                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7232         </fields>
7233                 <links>
7234                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7235                 </links>
7236         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7237             <actions>
7238                 <create permission="ADMIN_PROVIDER">
7239                     <context link="provider" field="owner"/>
7240                 </create>
7241                 <retrieve permission="ADMIN_PROVIDER">
7242                     <context link="provider" field="owner"/>
7243                 </retrieve>
7244                 <update permission="ADMIN_PROVIDER">
7245                     <context link="provider" field="owner"/>
7246                 </update>
7247                 <delete permission="ADMIN_PROVIDER">
7248                     <context link="provider" field="owner"/>
7249                 </delete>
7250             </actions>
7251         </permacrud>
7252     </class>
7253         <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">
7254                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7255                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7256                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7257                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7258                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7259                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7260                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7261                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7262                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7263                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7264                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7265                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7266                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7267                 </fields>
7268                 <links>
7269                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7270                 </links>
7271         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7272             <actions>
7273                 <create permission="ADMIN_PROVIDER">
7274                     <context link="contact" jump='provider' field="owner"/>
7275                 </create>
7276                 <retrieve permission="ADMIN_PROVIDER">
7277                     <context link="contact" jump='provider' field="owner"/>
7278                 </retrieve>
7279                 <update permission="ADMIN_PROVIDER">
7280                     <context link="contact" jump='provider' field="owner"/>
7281                 </update>
7282                 <delete permission="ADMIN_PROVIDER">
7283                     <context link="contact" jump='provider' field="owner"/>
7284                 </delete>
7285             </actions>
7286         </permacrud>
7287         </class>
7288
7289         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7290                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7291                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7292                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7293                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7294                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7295                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7296                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7297                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7298                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7299                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7300                 </fields>
7301                 <links>
7302                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7303                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7304                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7305                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7306                 </links>
7307         </class>
7308
7309         <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">
7310                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7311                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7312                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7313                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7314                 </fields>
7315                 <links>
7316             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7317                 </links>
7318                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7319                         <actions>
7320                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7321                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7322                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7323                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7324                         </actions>
7325                 </permacrud>
7326         </class>
7327
7328         <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">
7329                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7330                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7331                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7332                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7333                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7334                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7335                 </fields>
7336                 <links>
7337                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7338                 </links>
7339                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7340                         <actions>
7341                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7342                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7343                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7344                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7345                         </actions>
7346                 </permacrud>
7347         </class>
7348
7349         <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">
7350                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7351                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7352                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7353                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7354                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7355                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7356                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7357                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7358                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7359                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7360                 </fields>
7361                 <links>
7362                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7363                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7364             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7365             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7366                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7367                 </links>
7368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7369             <actions>
7370                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7371                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7372                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7373                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7374             </actions>
7375         </permacrud>
7376         </class>
7377
7378         <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">
7379                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7380                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7381                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7382                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7383                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7384                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7385                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7386                 </fields>
7387                 <links>
7388                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7389                 </links>
7390                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7391                         <actions>
7392                                 <create permission="ADMIN_FUNDING_SOURCE">
7393                     <context link="funding_source" field="owner"/>
7394                 </create>
7395                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7396                     <context link="funding_source" field="owner"/>
7397                 </retrieve>
7398                                 <update permission="ADMIN_FUNDING_SOURCE">
7399                     <context link="funding_source" field="owner"/>
7400                 </update>
7401                                 <delete permission="ADMIN_FUNDING_SOURCE">
7402                     <context link="funding_source" field="owner"/>
7403                 </delete>
7404                         </actions>
7405                 </permacrud>
7406         </class>
7407
7408         <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">
7409                 <fields oils_persist:primary="id">
7410                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7411                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7412                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7413                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7414                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7415                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7416                 </fields>
7417                 <links>
7418                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7419                 </links>
7420         </class>
7421
7422         <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">
7423                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7424                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7425                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7426                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7427                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7428                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7429                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7430                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7431                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7432                 </fields>
7433                 <links>
7434                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7435                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7436                 </links>
7437                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7438                         <actions>
7439                                 <create permission="ADMIN_ACQ_FUND">
7440                     <context link="fund" field="org"/>
7441                 </create>
7442                                 <retrieve permission="ADMIN_ACQ_FUND">
7443                     <context link="fund" field="org"/>
7444                 </retrieve>
7445                                 <update permission="ADMIN_ACQ_FUND">
7446                     <context link="fund" field="org"/>
7447                 </update>
7448                                 <delete permission="ADMIN_ACQ_FUND">
7449                     <context link="fund" field="org"/>
7450                 </delete>
7451                         </actions>
7452                 </permacrud>
7453         </class>
7454
7455         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7456                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7457                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7458                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7459                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7460                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7461                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7462                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7463                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7464                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7465                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7466                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7467                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7468                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7469                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7470                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7471                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7472                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7473                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7474                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7475                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7476                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7477                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7478                 </fields>
7479                 <links>
7480                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7481                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7482             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7483             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7484             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7485             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7486             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7487             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7488             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7489             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7490             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7491                 </links>
7492         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7493             <actions>
7494                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7495                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7496                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7497                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7498             </actions>
7499         </permacrud>
7500         </class>
7501
7502         <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">
7503                 <fields oils_persist:primary="fund">
7504                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7505                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7506                 </fields>
7507                 <links>
7508                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7509                 </links>
7510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7511             <actions>
7512                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7513                                         <context link="fund" field="org" />
7514                 </retrieve>
7515             </actions>
7516         </permacrud>
7517         </class>
7518
7519         <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">
7520                 <fields oils_persist:primary="fund">
7521                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7522                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7523                 </fields>
7524                 <links>
7525                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7526                 </links>
7527         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7528             <actions>
7529                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7530                                         <context link="fund" field="org" />
7531                 </retrieve>
7532             </actions>
7533         </permacrud>
7534         </class>
7535
7536         <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">
7537                 <fields oils_persist:primary="fund">
7538                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7539                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7540                 </fields>
7541                 <links>
7542                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7543                 </links>
7544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7545             <actions>
7546                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7547                                         <context link="fund" field="org" />
7548                 </retrieve>
7549             </actions>
7550         </permacrud>
7551         </class>
7552
7553         <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">
7554                 <fields oils_persist:primary="fund">
7555                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7556                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7557                 </fields>
7558                 <links>
7559                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7560                 </links>
7561         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7562             <actions>
7563                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7564                                         <context link="fund" field="org" />
7565                 </retrieve>
7566             </actions>
7567         </permacrud>
7568         </class>
7569
7570         <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">
7571                 <fields oils_persist:primary="fund">
7572                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7573                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7574                 </fields>
7575                 <links>
7576                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7577                 </links>
7578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7579             <actions>
7580                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7581                                         <context link="fund" field="org" />
7582                 </retrieve>
7583             </actions>
7584         </permacrud>
7585         </class>
7586
7587    <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">
7588         <fields oils_persist:primary="fund">
7589             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7590             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7591         </fields>
7592         <links>
7593             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7594         </links>
7595     </class>
7596
7597    <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">
7598         <fields oils_persist:primary="fund">
7599             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7600             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7601         </fields>
7602         <links>
7603             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7604         </links>
7605     </class>
7606
7607    <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">
7608         <fields oils_persist:primary="fund">
7609             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7610             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7611         </fields>
7612         <links>
7613             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7614         </links>
7615     </class>
7616
7617    <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">
7618         <fields oils_persist:primary="fund">
7619             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7620             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7621         </fields>
7622         <links>
7623             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7624         </links>
7625     </class>
7626
7627    <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">
7628         <fields oils_persist:primary="fund">
7629             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7630             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7631         </fields>
7632         <links>
7633             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7634         </links>
7635     </class>
7636
7637         <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">
7638                 <fields oils_persist:primary="funding_source">
7639                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7640                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7641                 </fields>
7642                 <links>
7643                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7644                 </links>
7645         </class>
7646
7647         <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">
7648                 <fields oils_persist:primary="funding_source">
7649                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7650                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7651                 </fields>
7652                 <links>
7653                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7654                 </links>
7655         </class>
7656
7657         <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">
7658                 <fields oils_persist:primary="funding_source">
7659                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7660                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7661                 </fields>
7662                 <links>
7663                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7664                 </links>
7665         </class>
7666
7667         <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">
7668                 <fields oils_persist:primary="fund">
7669                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7670                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7671                 </fields>
7672                 <links>
7673                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7674                 </links>
7675         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7676             <actions>
7677                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7678                                         <context link="fund" field="org" />
7679                 </retrieve>
7680             </actions>
7681         </permacrud>
7682     </class>
7683     <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">
7684         <oils_persist:source_definition><![CDATA[
7685             SELECT
7686                 acqf.*,
7687                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7688                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7689                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7690                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7691             FROM
7692                 acq.fund acqf
7693                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7694                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7695                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7696                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7697         ]]></oils_persist:source_definition>
7698         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7699             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7700             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7701             <field reporter:label="Name" name="name" reporter:datatype="text" />
7702             <field reporter:label="Year" name="year" reporter:datatype="int" />
7703             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7704             <field reporter:label="Code" name="code" reporter:datatype="text" />
7705             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7706             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7707             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7708             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7709             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7710
7711             <!-- non fund-native fields -->
7712             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7713             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7714             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7715             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7716         </fields>
7717         <links>
7718             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7719             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7720             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7721         </links>
7722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7723             <actions>
7724                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7725             </actions>
7726         </permacrud>
7727         </class>
7728         <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">
7729                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7730                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7731                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7732                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7733                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7734                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7735                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7736                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7737                 </fields>
7738                 <links>
7739                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7740                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7741                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7742                 </links>
7743                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7744                         <actions>
7745                                 <create permission="ADMIN_ACQ_FUND">
7746                     <context link="fund" field="org"/>
7747                 </create>
7748                                 <retrieve permission="ADMIN_ACQ_FUND">
7749                     <context link="fund" field="org"/>
7750                 </retrieve>
7751                                 <update permission="ADMIN_ACQ_FUND">
7752                     <context link="fund" field="org"/>
7753                 </update>
7754                                 <delete permission="ADMIN_ACQ_FUND">
7755                     <context link="fund" field="org"/>
7756                 </delete>
7757                         </actions>
7758                 </permacrud>
7759         </class>
7760
7761     <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">
7762         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7763             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7764             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7765             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7766             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7767             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7768             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7769             <field reporter:label="Note" name="note" reporter:datatype="text" />
7770             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7771         </fields>
7772         <links>
7773             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7774             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7775             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7776         </links>
7777                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7778                         <actions>
7779                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7780                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7781                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7782                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7783                         </actions>
7784                 </permacrud>
7785     </class>
7786
7787         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7788                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7789                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7790                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7791                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7792                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7793                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7794                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7795                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7796                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7797                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7798                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7799                 </fields>
7800                 <links>
7801                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7802                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7803                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7804                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7805                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7806                 </links>
7807                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7808                         <actions>
7809                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7810                         </actions>
7811                 </permacrud>
7812         </class>
7813
7814         <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">
7815                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7816                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7817                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7818                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7819                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7820                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7821                 </fields>
7822                 <links>
7823                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7824                 </links>
7825                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7826                         <actions>
7827                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7828                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7829                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7830                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7831                         </actions>
7832                 </permacrud>
7833         </class>
7834
7835         <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">
7836                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7837                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7838                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7839                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7840                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7841                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7842                         <field reporter:label="State" name="state" reporter:datatype="text" />
7843                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7844                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7845                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7846                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7847                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7848                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7849                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7850                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7851                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7852                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7853                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7854                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7855                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7856                 </fields>
7857                 <links>
7858                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7859                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7860                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7861                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7862                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7863                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7864                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7865                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7866                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7867                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7868                 </links>
7869                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7870                         <actions>
7871                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7872                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7873                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7874                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7875                         </actions>
7876                 </permacrud>
7877         </class>
7878
7879         <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">
7880                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7881                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7882                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7883                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7884                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7885                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7886                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7887                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7888                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7889                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7890                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7891                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7892                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7893                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7894                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7895                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7896                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7897                 </fields>
7898                 <links>
7899                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7900                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7901                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7902                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7903                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7904                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7905                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7906                 </links>
7907                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7908             <actions>
7909                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7910             </actions>
7911                 </permacrud>
7912         </class>
7913
7914         <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">
7915                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7916                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7917                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7918                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7919                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7920                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7921                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7922                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7923                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7924                 </fields>
7925                 <links>
7926                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7927                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7928                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7929                 </links>
7930                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7931             <actions>
7932                 <create permission="CREATE_PURCHASE_ORDER">
7933                     <context link="purchase_order" field="ordering_agency"/>
7934                 </create>
7935                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7936                     <context link="purchase_order" field="ordering_agency"/>
7937                 </retrieve>
7938                 <update permission="CREATE_PURCHASE_ORDER">
7939                     <context link="purchase_order" field="ordering_agency"/>
7940                 </update>
7941                 <delete permission="CREATE_PURCHASE_ORDER">
7942                     <context link="purchase_order" field="ordering_agency"/>
7943                 </delete>
7944             </actions>
7945                 </permacrud>
7946         </class>
7947
7948         <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">
7949                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7950                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7951                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7952                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7953                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7954                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7955                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7956                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7957                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7958                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7959                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7960                 </fields>
7961                 <links>
7962                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7963                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7964                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7965                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7966                 </links>
7967                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7968             <actions>
7969                 <create permission="CREATE_PURCHASE_ORDER">
7970                     <context link="purchase_order" field="ordering_agency"/>
7971                 </create>
7972                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7973                     <context link="purchase_order" field="ordering_agency"/>
7974                 </retrieve>
7975                 <update permission="CREATE_PURCHASE_ORDER">
7976                     <context link="purchase_order" field="ordering_agency"/>
7977                 </update>
7978                 <delete permission="CREATE_PURCHASE_ORDER">
7979                     <context link="purchase_order" field="ordering_agency"/>
7980                 </delete>
7981             </actions>
7982                 </permacrud>
7983         </class>
7984
7985         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7986                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7987                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7988                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7989                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7990                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7991                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7992                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7993                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7994                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7995                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7996                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7997                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7998                         <field reporter:label="State" name="state" reporter:datatype="text" />
7999                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8000                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8001                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8002                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8003                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8004                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8005                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8006                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8007                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8008                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8009                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8010                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8011                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8012                 </fields>
8013                 <links>
8014                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8015                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8016                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8017                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8018                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8019                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8020                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8021                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8022                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8023                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8024                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8025                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8026                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8027                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8028                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8029                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8030                 </links>
8031                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8032                         <actions>
8033                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8034                                         <context link="purchase_order" field="ordering_agency"/>
8035                                         <context link="picklist" field="org_unit"/>
8036                                 </retrieve>
8037                         </actions>
8038                 </permacrud>
8039         </class>
8040
8041         <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">
8042                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8043                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8044                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8045                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8046                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8047                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8048                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8049                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8050                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8051                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8052                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8053                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8054                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8055                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8056                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8057                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8058                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8059                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8060                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8061                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8062                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8063                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8064                 </fields>
8065                 <links>
8066                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8067                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8068                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8069                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8070                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8071                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8072                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8073                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8074                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8075                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8076                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8077                 </links>
8078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8079                         <actions>
8080                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8081                                         <context link="purchase_order" field="ordering_agency"/>
8082                                         <context link="picklist" field="org_unit"/>
8083                                 </retrieve>
8084                         </actions>
8085                 </permacrud>
8086         </class>
8087
8088         <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">
8089                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8090                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8091                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8092                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8093                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8094                 </fields>
8095                 <links>
8096                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8097                 </links>
8098                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8099                         <actions>
8100                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8101                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8102                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8103                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8104                         </actions>
8105                 </permacrud>
8106         </class>
8107
8108         <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">
8109                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8110                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8111                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8112                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8113                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8114                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8115                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8116                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8117                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8118                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8119                 </fields>
8120                 <links>
8121                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8122                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8123                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8124                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8125                 </links>
8126         </class>
8127
8128         <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">
8129                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8130                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8131                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8132                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8133                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8134                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8135                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8136                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8137                 </fields>
8138                 <links>
8139                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8140                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8141                 </links>
8142         </class>
8143
8144         <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">
8145                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8146                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8147                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8148                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8149                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8150                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8151                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8152                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8153                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8154                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8155                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8156                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8157                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8158                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8159                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8160                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8161                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8162                 </fields>
8163                 <links>
8164                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8165                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8166                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8167                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8168                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8169                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8170                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8171                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8172                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8173                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8174                 </links>
8175         </class>
8176
8177         <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">
8178                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8179                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8180                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8181                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8182                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8183                 </fields>
8184                 <links/>
8185                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8186                         <actions>
8187                                 <retrieve />
8188                         </actions>
8189                 </permacrud>
8190         </class>
8191
8192         <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">
8193                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8194                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8195                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8196                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8197                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8198                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8199             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8200                 </fields>
8201                 <links/>
8202         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8203             <actions>
8204                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8205                 <retrieve />
8206                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8207                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8208             </actions>
8209         </permacrud>
8210         </class>
8211
8212         <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">
8213                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8214                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8215                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8216                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8217                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8218                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8219                 </fields>
8220                 <links/>
8221         </class>
8222         <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">
8223                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8224                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8225                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8226                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8227                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8228                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8229                 </fields>
8230                 <links>
8231                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8232                 </links>
8233         </class>
8234
8235         <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">
8236             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8237                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8238                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8239                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8240                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8241                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8242                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8243         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8244
8245             </fields>
8246             <links>
8247                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8248             </links>
8249             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8250                 <actions>
8251                     <create permission="ADMIN_PROVIDER">
8252                         <context link="provider" field="owner"/>
8253                     </create>
8254                     <retrieve permission="ADMIN_PROVIDER">
8255                         <context link="provider" field="owner"/>
8256                     </retrieve>
8257                     <update permission="ADMIN_PROVIDER">
8258                         <context link="provider" field="owner"/>
8259                     </update>
8260                     <delete permission="ADMIN_PROVIDER">
8261                         <context link="provider" field="owner"/>
8262                     </delete>
8263                 </actions>
8264             </permacrud>
8265         </class>
8266         
8267         <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">
8268             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8269                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8270                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8271                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8272                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8273             </fields>
8274             <links>
8275                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8276             </links>
8277             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8278                 <actions>
8279                     <create permission="ADMIN_PROVIDER">
8280                         <context link="provider" field="owner"/>
8281                     </create>
8282                     <retrieve permission="ADMIN_PROVIDER">
8283                         <context link="provider" field="owner"/>
8284                     </retrieve>
8285                     <update permission="ADMIN_PROVIDER">
8286                         <context link="provider" field="owner"/>
8287                     </update>
8288                     <delete permission="ADMIN_PROVIDER">
8289                         <context link="provider" field="owner"/>
8290                     </delete>
8291                 </actions>
8292             </permacrud>
8293         </class>
8294         
8295         <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">
8296             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8297                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8298                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8299                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8300                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8301                 </fields>
8302                 <links/>
8303         </class>
8304
8305         <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">
8306                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8307                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8308                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8309                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8310                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8311                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8312                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8313                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8314                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8315                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8316                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8317                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8318                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8319                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8320                 </fields>
8321                 <links>
8322                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8323                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8324                 </links>
8325         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8326             <actions>
8327                 <create permission="ADMIN_PROVIDER">
8328                     <context link="provider" field="owner"/>
8329                 </create>
8330                 <retrieve permission="ADMIN_PROVIDER">
8331                     <context link="provider" field="owner"/>
8332                 </retrieve>
8333                 <update permission="ADMIN_PROVIDER">
8334                     <context link="provider" field="owner"/>
8335                 </update>
8336                 <delete permission="ADMIN_PROVIDER">
8337                     <context link="provider" field="owner"/>
8338                 </delete>
8339             </actions>
8340         </permacrud>
8341         </class>
8342
8343         <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">
8344                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8345                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8346                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8347                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8348                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8349                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8350                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8351                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8352                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8353                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8354                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8355                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8356                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8357                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8358                 </fields>
8359                 <links>
8360                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8361                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8362                 </links>
8363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8364             <actions>
8365                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8366                     <context link="account" jump="provider" field="owner"/>
8367                 </retrieve>
8368                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8369                     <context link="account" jump="provider" field="owner"/>
8370                 </update>
8371                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8372                     <context link="account" jump="provider" field="owner"/>
8373                 </delete>
8374             </actions>
8375         </permacrud>
8376         </class>
8377
8378
8379         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8380                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8381                         <field name="id" reporter:datatype="id" />
8382                         <field name="parent" reporter:datatype="link"/>
8383                         <field name="owner" reporter:datatype="link"/>
8384                         <field name="create_time" reporter:datatype="timestamp"/>
8385                         <field name="name" reporter:datatype="text"/>
8386                         <field name="shared" reporter:datatype="bool"/>
8387                         <field name="share_with" reporter:datatype="link"/>
8388                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8389                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8390                 </fields>
8391                 <links>
8392                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8393                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8394                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8395                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8396                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8397                 </links>
8398         </class>
8399         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8400                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8401                         <field name="id" reporter:datatype="id" />
8402                         <field name="parent" reporter:datatype="link"/>
8403                         <field name="owner" reporter:datatype="link"/>
8404                         <field name="create_time" reporter:datatype="timestamp"/>
8405                         <field name="name" reporter:datatype="text"/>
8406                         <field name="shared" reporter:datatype="bool"/>
8407                         <field name="share_with" reporter:datatype="link"/>
8408                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8409                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8410                 </fields>
8411                 <links>
8412                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8413                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8414                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8415                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8416                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8417                 </links>
8418         </class>
8419         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8420                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8421                         <field name="id" reporter:datatype="id" />
8422                         <field name="parent" reporter:datatype="link"/>
8423                         <field name="owner" reporter:datatype="link"/>
8424                         <field name="create_time" reporter:datatype="timestamp"/>
8425                         <field name="name" reporter:datatype="text"/>
8426                         <field name="shared" reporter:datatype="bool"/>
8427                         <field name="share_with" reporter:datatype="link"/>
8428                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8429                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8430                 </fields>
8431                 <links>
8432                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8433                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8434                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8435                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8436                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8437                 </links>
8438         </class>
8439         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8440                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8441                         <field name="id" reporter:datatype="id" />
8442                         <field name="owner" reporter:datatype="link"/>
8443                         <field name="create_time" reporter:datatype="timestamp"/>
8444                         <field name="name" reporter:datatype="text"/>
8445                         <field name="data" reporter:datatype="text"/>
8446                         <field name="folder" reporter:datatype="link"/>
8447                         <field name="description" reporter:datatype="text"/>
8448                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8449                 </fields>
8450                 <links>
8451                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8452                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8453                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8454                 </links>
8455         </class>
8456         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8457                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8458                         <field name="id" reporter:datatype="id" />
8459                         <field name="owner" reporter:datatype="link"/>
8460                         <field name="create_time" reporter:datatype="timestamp"/>
8461                         <field name="template" reporter:datatype="link"/>
8462                         <field name="data" reporter:datatype="text"/>
8463                         <field name="folder" reporter:datatype="link"/>
8464                         <field name="recur" reporter:datatype="bool"/>
8465                         <field name="recurrence" reporter:datatype="interval"/>
8466                         <field name="name" reporter:datatype="text"/>
8467                         <field name="description" reporter:datatype="text"/>
8468                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8469                 </fields>
8470                 <links>
8471                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8472                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8473                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8474                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8475                 </links>
8476         </class>
8477         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8478                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8479                         <field name="id" reporter:datatype="id" />
8480                         <field name="runner" reporter:datatype="link"/>
8481                         <field name="start_time" reporter:datatype="timestamp"/>
8482                         <field name="complete_time" reporter:datatype="timestamp"/>
8483                         <field name="run_time" reporter:datatype="timestamp"/>
8484                         <field name="email" reporter:datatype="text"/>
8485                         <field name="excel_format" reporter:datatype="bool"/>
8486                         <field name="csv_format" reporter:datatype="bool"/>
8487                         <field name="html_format" reporter:datatype="bool"/>
8488                         <field name="error_code" reporter:datatype="int"/>
8489                         <field name="error_text" reporter:datatype="text"/>
8490                         <field name="report" reporter:datatype="link"/>
8491                         <field name="folder" reporter:datatype="link"/>
8492                         <field name="chart_pie" reporter:datatype="bool"/>
8493                         <field name="chart_bar" reporter:datatype="bool"/>
8494                         <field name="chart_line" reporter:datatype="bool"/>
8495                 </fields>
8496                 <links>
8497                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8498                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8499                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8500                 </links>
8501         </class>
8502         <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">
8503                 <fields oils_persist:primary="id">
8504                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8505                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8506                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8507                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8508                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8509                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8510                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8511                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8512                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8513                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8514                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8515                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8516                 </fields>
8517                 <links>
8518                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8519                 </links>
8520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8521                         <actions>
8522                                 <retrieve />
8523                         </actions>
8524                 </permacrud>
8525         </class>
8526         <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">
8527                 <fields oils_persist:primary="id">
8528                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8529                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8530                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8531                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8532                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8533                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8534                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8535                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8536                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8537                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8538                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8539                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8540                 </fields>
8541                 <links>
8542                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8543                 </links>
8544         </class>
8545         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8546                 <fields oils_persist:primary="id">
8547                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8548                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8549                         <field reporter:label="Fingerprint" name="fingerprint" />
8550                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8551                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8552                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8553                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8554                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8555                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8556                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8557                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8558                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8559                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8560                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8561                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8562                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8563                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8564                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8565                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8566                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8567                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8568                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8569                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8570                 </fields>
8571                 <links>
8572                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8573                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8574                 </links>
8575         </class>
8576         <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">
8577                 <fields oils_persist:primary="id">
8578                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8579                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8580                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8581                 </fields>
8582                 <links>
8583                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8584                 </links>
8585         </class>
8586         <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">
8587                 <fields oils_persist:primary="id">
8588                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8589                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8590                 </fields>
8591                 <links>
8592                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8593                 </links>
8594         </class>
8595         <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">
8596                 <fields oils_persist:primary="id">
8597                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8598                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8599                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8600                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8601                 </fields>
8602                 <links>
8603                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8604                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8605                 </links>
8606         </class>
8607         <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">
8608                 <fields oils_persist:primary="xact">
8609                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8610                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8611                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8612                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8613                 </fields>
8614                 <links>
8615                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8616                 </links>
8617         </class>
8618         <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">
8619                 <fields oils_persist:primary="xact">
8620                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8621                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8622                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8623                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8624                 </fields>
8625                 <links>
8626                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8627                 </links>
8628         </class>
8629         <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)">
8630                 <fields oils_persist:primary="id">
8631                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8632                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8633                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8634                 </fields>
8635                 <links>
8636                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8637                 </links>
8638         </class>
8639         <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">
8640                 <fields oils_persist:primary="id">
8641                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8642                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8643                 </fields>
8644                 <links>
8645                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8646                 </links>
8647         </class>
8648         <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">
8649                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8650                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
8651                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8652                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8653                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8654                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8655                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8656                 </fields>
8657                 <links>
8658                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8659                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8660                 </links>
8661                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8662                         <actions>
8663                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8664                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8665                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8666                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8667                         </actions>
8668                 </permacrud>
8669         </class>
8670         <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">
8671                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8672                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8673                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8674                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8675                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8676                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8677                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8678                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8679                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
8680                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
8681                 </fields>
8682                 <links>
8683                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8684                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8685                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8686                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8687                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8688                 </links>
8689                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8690                         <actions>
8691                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8692                                         <context link="formula" field="owner"/>
8693                                 </create>
8694                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8695                                         <context link="formula" field="owner"/>
8696                                 </retrieve>
8697                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8698                                         <context link="formula" field="owner"/>
8699                                 </update>
8700                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8701                                         <context link="formula" field="owner"/>
8702                                 </delete>
8703                         </actions>
8704                 </permacrud>
8705         </class>
8706
8707         <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">
8708                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8709                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8710                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8711                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8712                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8713                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8714                 </fields>
8715                 <links>
8716                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8717                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8718                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8719                 </links>
8720                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8721                         <actions>
8722                                 <create permission="CREATE_PURCHASE_ORDER">
8723                                         <context link="formula" field="owner"/>
8724                 </create>
8725                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8726                                         <context link="formula" field="owner"/>
8727                 </retrieve>
8728                                 <update permission="CREATE_PURCHASE_ORDER">
8729                                         <context link="formula" field="owner"/>
8730                 </update>
8731                                 <delete permission="CREATE_PURCHASE_ORDER">
8732                                         <context link="formula" field="owner"/>
8733                 </delete>
8734                         </actions>
8735                 </permacrud>
8736         </class>
8737
8738         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8739                 <fields oils_persist:primary="id">
8740                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8741                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8742                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8743                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8744                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8745                 </fields>
8746                 <links>
8747                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8748                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8749                 </links>
8750         </class>
8751
8752         <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">
8753                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8754                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8755                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8756                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8757                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8758                 </fields>
8759                 <links>
8760                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8761                 </links>
8762                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8763                         <actions>
8764                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8765                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8766                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8767                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8768                         </actions>
8769                 </permacrud>
8770         </class>
8771
8772         <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">
8773                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8774                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8775                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8776                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8777                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8778                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8779                 </fields>
8780                 <links>
8781                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8782                 </links>
8783                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8784                         <actions>
8785                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8786                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8787                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8788                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8789                         </actions>
8790                 </permacrud>
8791         </class>
8792
8793         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8794                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8795                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8796                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8797                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8798                 </fields>
8799                 <links>
8800                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8801                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8802                 </links>
8803         </class>
8804
8805         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8806                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8807                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8808                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8809                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8810                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8811                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8812                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8813                 </fields>
8814                 <links>
8815                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8816                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8817                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8818                 </links>
8819         </class>
8820
8821         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8822                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8823                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8824                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8825                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8826                 </fields>
8827                 <links>
8828                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8829                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8830                 </links>
8831         </class>
8832
8833         <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">
8834                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8835                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8836                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8837                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8838                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8839                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8840                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8841                 </fields>
8842                 <links>
8843                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8844                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8845                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8846                 </links>
8847         </class>
8848
8849         <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">
8850                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8851                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8852                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8853                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8854                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8855                 </fields>
8856                 <links>
8857                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8858                 </links>
8859                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8860             <actions>
8861                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8862                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8863                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8864                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8865             </actions>
8866                 </permacrud>
8867         </class>
8868
8869         <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">
8870                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8871                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8872                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8873                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8874                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8875                 </fields>
8876                 <links>
8877                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8878                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8879                 </links>
8880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8881                         <actions>
8882                                 <create permission="ADMIN_CLAIM_POLICY">
8883                                         <context link="claim_policy" field="org_unit"/>
8884                 </create>
8885                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8886                                         <context link="claim_policy" field="org_unit"/>
8887                 </retrieve>
8888                                 <update permission="ADMIN_CLAIM_POLICY">
8889                                         <context link="claim_policy" field="org_unit"/>
8890                 </update>
8891                                 <delete permission="ADMIN_CLAIM_POLICY">
8892                                         <context link="claim_policy" field="org_unit"/>
8893                 </delete>
8894                         </actions>
8895                 </permacrud>
8896         </class>
8897
8898     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8899         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8900             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8901             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8902             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8903             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8904             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8905             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8906             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8907             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8908             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8909             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8910             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8911             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8912             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8913             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8914             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8915         </fields>
8916     </class>
8917
8918     <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">
8919         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8920             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8921             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8922             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8923             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8924             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8925         </fields>
8926     </class>
8927
8928     <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">
8929         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8930             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8931             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8932             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8933             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8934             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8935             <field reporter:label="City" name="city" reporter:datatype="text"/>
8936             <field reporter:label="State" name="state" reporter:datatype="text"/>
8937             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8938             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8939             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8940         </fields>
8941     </class>
8942
8943     <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">
8944         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8945             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8946             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8947             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8948             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8949             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8950             <field reporter:label="City" name="city" reporter:datatype="text"/>
8951             <field reporter:label="State" name="state" reporter:datatype="text"/>
8952             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8953             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8954             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8955         </fields>
8956     </class>
8957
8958     <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">
8959         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8960             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8961             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8962             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8963             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8964             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8965             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8966         </fields>
8967     </class>
8968
8969         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8970                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8971                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8972                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8973                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8974                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8975                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8976                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8977                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8978                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8979                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8980                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8981                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8982                 </fields>
8983                 <links>
8984                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8985                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8986                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8987                 </links>
8988         </class>
8989
8990         <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">
8991                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8992                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8993                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8994                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8995                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8996                 </fields>
8997                 <links>
8998                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8999                 </links>
9000         </class>
9001
9002     <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">
9003         <fields>
9004             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9005             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9006             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9007         </fields>
9008                 <links>
9009                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9010                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9011                 </links>
9012     </class>
9013
9014     <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">
9015         <fields>
9016             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9017             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9018         </fields>
9019                 <links>
9020                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9021                 </links>
9022     </class>
9023
9024     <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">
9025         <fields>
9026             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9027             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9028             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9029         </fields>
9030                 <links>
9031                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9032                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9033                 </links>
9034     </class>
9035
9036     <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">
9037         <fields>
9038             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9039             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9040         </fields>
9041                 <links>
9042                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9043                 </links>
9044     </class>
9045
9046     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9047                 <oils_persist:source_definition>
9048
9049             SELECT  DISTINCT l.*
9050               FROM  action.unfulfilled_hold_loops l
9051                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9052               WHERE l.count = m.max
9053
9054                 </oils_persist:source_definition>
9055         <fields>
9056             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9057             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9058             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9059         </fields>
9060                 <links>
9061                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9062                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9063                 </links>
9064     </class>
9065
9066         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9067                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9068                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9069                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9070                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9071                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9072                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9073                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9074                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9075                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9076                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9077                 </fields>
9078                 <links>
9079                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9080                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9081                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9082                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9083                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9084                 </links>
9085         </class>
9086
9087         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9088                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9089                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9090                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9091                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9092                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9093                 </fields>
9094                 <links>
9095                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9096                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9097                 </links>
9098         </class>
9099
9100         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9101                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9102                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9103                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9104                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9105                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9106                 </fields>
9107                 <links>
9108                 </links>
9109         </class>
9110
9111         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9112                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9113                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9114                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9115                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9116                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9117                 </fields>
9118                 <links>
9119                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9120                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9121                 </links>
9122         </class>
9123         
9124         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9125                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9126                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9127                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9128                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9129                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9130                 </fields>
9131                 <links>
9132                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9133                 </links>
9134         </class>
9135         
9136         <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">
9137                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9138                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9139                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9140                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9141                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9142                 </fields>
9143                 <links>
9144                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9145                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9146                 </links>
9147         </class>
9148
9149         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9150                 <fields oils_persist:primary="name">
9151                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9152                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9153                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9154                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9155                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9156                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9157                 </fields>
9158                 <links>
9159                 </links>
9160         </class>
9161
9162         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9163                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9164                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9165                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9166                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9167                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9168                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9169                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9170                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9171                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9172                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9173                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9174                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9175                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9176                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9177                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9178                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9179                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9180                 </fields>
9181                 <links>
9182                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9183                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9184                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9185                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9186                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9187                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9188                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9189                 </links>
9190         </class>
9191
9192         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9193                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9194                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9195                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9196                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9197                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9198                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9199                 </fields>
9200                 <links>
9201                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9202                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9203                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9204                 </links>
9205         </class>
9206
9207         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9208                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9209                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9210                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9211                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9212                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9213                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9214                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9215                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9216                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9217                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9218                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9219                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9220                 </fields>
9221                 <links>
9222                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9223                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9224                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9225                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9226                 </links>
9227         </class>
9228
9229         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9230                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9231                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9232                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9233                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9234                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9235                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9236                 </fields>
9237                 <links>
9238                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9239                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9240                 </links>
9241         </class>
9242
9243         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9244                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9245                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9246                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9247                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9248                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9249                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9250                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9251                 </fields>
9252                 <links>
9253                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9254                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9255                 </links>
9256         </class>
9257
9258         <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">
9259                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9260                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9261                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9262                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9263                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9264                 </fields>
9265                 <links>
9266                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9267                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9268                 </links>
9269         </class>
9270
9271         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9272                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9273                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9274                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9275                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9276                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9277                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9278                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9279                 </fields>
9280                 <links>
9281                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9282                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9283                 </links>
9284         </class>
9285
9286         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9287                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9288                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9289                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9290                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9291                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9292                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9293                 </fields>
9294                 <links>
9295                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9296                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9297                 </links>
9298         </class>
9299
9300         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9301                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9302                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9303                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9304                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9305                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9306                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9307                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9308                 </fields>
9309                 <links>
9310                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9311                 </links>
9312         </class>
9313
9314         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9315                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9316                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9317                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9318                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9319                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9320                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9321                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9322                 </fields>
9323                 <links>
9324                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9325                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9326                 </links>
9327         </class>
9328
9329         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9330                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9331                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9332                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9333                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9334                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9335                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9336                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9337                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9338                 </fields>
9339                 <links>
9340                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9341                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9342                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9343                 </links>
9344         </class>
9345
9346         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9347                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9348                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9349                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9350                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9351                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9352                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9353                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9354                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9355                 </fields>
9356                 <links>
9357                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9358                 </links>
9359         </class>
9360
9361         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9362                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9363                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9364                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9365                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9366                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9367                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9368                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9369                 </fields>
9370                 <links>
9371                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9372                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9373                 </links>
9374         </class>
9375
9376         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9377                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9378                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9379                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9380                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9381                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9382                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9383                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9384                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9385                 </fields>
9386                 <links>
9387                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9388                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9389                 </links>
9390         </class>
9391
9392         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9393                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9394                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9395                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9396                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9397                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9398                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9399                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9400                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9401                 </fields>
9402                 <links>
9403                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9404                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9405                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9406                 </links>
9407         </class>
9408
9409         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9410                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9411                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9412                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9413                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9414                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9415                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9416                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9417                 </fields>
9418                 <links>
9419                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9420                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9421                 </links>
9422         </class>
9423
9424         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9425                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9426                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9427                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9428                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9429                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9430                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9431                 </fields>
9432                 <links>
9433                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9434                 </links>
9435         </class>
9436
9437         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9438                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9439                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9440                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9441                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9442                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9443                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9444                 </fields>
9445                 <links>
9446                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9447                 </links>
9448         </class>
9449
9450         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9451                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9452                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9453                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9454                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9455                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9456                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9457                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9458                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9459                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9460                 </fields>
9461                 <links>
9462                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9463                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9464                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9465                 </links>
9466         </class>
9467
9468         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9469                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9470                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9471                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9472                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9473                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9474                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9475                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9476                 </fields>
9477                 <links>
9478                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9479                 </links>
9480         </class>
9481
9482         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9483                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9484                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9485                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9486                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9487                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9488                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9489                 </fields>
9490                 <links>
9491                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9492                 </links>
9493         </class>
9494
9495         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9496                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9497                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9498                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9499                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9500                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9501                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9502                 </fields>
9503                 <links>
9504                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9505                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9506                 </links>
9507         </class>
9508
9509         <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">
9510                 <fields oils_persist:primary="id">
9511                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9512                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9513                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9514                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9515                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9516                 </fields>
9517                 <links>
9518                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9519                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9520                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9521                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9522                 </links>
9523         </class>
9524
9525         <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">
9526                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9527                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9528                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9529                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9530                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9531                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9532                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9533                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9534                 </fields>
9535                 <links/>
9536                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9537                         <actions>
9538                                 <retrieve/>
9539                         </actions>
9540                 </permacrud>
9541         </class>
9542
9543         <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">
9544                 <fields oils_persist:primary="ptype_key">
9545                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9546                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9547                 </fields>
9548                 <links/>
9549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9550                         <actions>
9551                                 <retrieve/>
9552                         </actions>
9553                 </permacrud>
9554         </class>
9555
9556         <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">
9557                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9558                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9559                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9560                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9561                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9562                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9563                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9564                 </fields>
9565                 <links>
9566                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9567                 </links>
9568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9569                         <actions>
9570                                 <retrieve/>
9571                         </actions>
9572                 </permacrud>
9573         </class>
9574
9575         <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">
9576                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9577                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9578                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9579                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9580                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9581                 </fields>
9582                 <links>
9583                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9584                 </links>
9585                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9586                         <actions>
9587                                 <retrieve/>
9588                         </actions>
9589                 </permacrud>
9590         </class>
9591
9592     <class
9593         id="uvs"
9594         controller="open-ils.cstore open-ils.pcrud"
9595         oils_obj:fieldmapper="url_verify::session"
9596         oils_persist:tablename="url_verify.session"
9597         reporter:label="URL Verification Session"
9598     >
9599         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9600             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9601             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9602                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9603             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9604             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9605             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9606             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9607             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9608             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9609         </fields>
9610
9611         <links>
9612             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9613             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9614             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9615             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9616             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9617         </links>
9618
9619         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9620             <actions>
9621                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9622             </actions>
9623         </permacrud>
9624
9625     </class>
9626
9627     <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">
9628         <oils_persist:source_definition>
9629             SELECT
9630                 cbrebi.id AS id,  -- so we can have a pkey in our view
9631                 uvs.id AS session,
9632                 uvs.owning_lib,
9633                 cbrebi.target_biblio_record_entry
9634             FROM url_verify.session uvs
9635             JOIN container.biblio_record_entry_bucket cbreb
9636                 ON (uvs.container = cbreb.id)
9637             JOIN container.biblio_record_entry_bucket_item cbrebi
9638                 ON (cbrebi.bucket = cbreb.id)
9639         </oils_persist:source_definition>
9640         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9641             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9642             <field reporter:label="Session" name="session" reporter:datatype="link" />
9643             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9644             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9645         </fields>
9646         <links>
9647             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9648             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9649             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9650         </links>
9651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9652             <actions>
9653                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9654             </actions>
9655         </permacrud>
9656     </class>
9657
9658     <class
9659         id="uvus"
9660         controller="open-ils.cstore open-ils.pcrud"
9661         oils_obj:fieldmapper="url_verify::url_selector"
9662         oils_persist:tablename="url_verify.url_selector"
9663         reporter:label="URL Verification URL Selector"
9664     >
9665         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9666             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9667             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9668                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9669             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9670         </fields>
9671
9672         <links>
9673             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9674             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9675         </links>
9676
9677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9678             <actions>
9679                 <create permission="URL_VERIFY">
9680                     <context link="session" field="owning_lib"/>
9681                 </create>
9682                 <retrieve permission="URL_VERIFY">
9683                     <context link="session" field="owning_lib"/>
9684                 </retrieve>
9685                 <update permission="URL_VERIFY">
9686                     <context link="session" field="owning_lib"/>
9687                 </update>
9688                 <delete permission="URL_VERIFY">
9689                     <context link="session" field="owning_lib"/>
9690                 </delete>
9691             </actions>
9692         </permacrud>
9693
9694     </class>
9695
9696     <class
9697         id="uvu"
9698         controller="open-ils.cstore open-ils.pcrud"
9699         oils_obj:fieldmapper="url_verify::url"
9700         oils_persist:tablename="url_verify.url"
9701         reporter:label="URL Verification URL"
9702     >
9703         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9704             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9705                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9706                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9707                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9708                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9709             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9710             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9711             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9712             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9713             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9714             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9715             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9716             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9717             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9718             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9719             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9720             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9721             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9722         </fields>
9723
9724         <links>
9725             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9726             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9727             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9728             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9729             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9730         </links>
9731
9732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9733             <actions>
9734                 <create permission="URL_VERIFY">
9735                     <context link="session" field="owning_lib"/>
9736                 </create>
9737                 <retrieve permission="URL_VERIFY">
9738                     <context link="session" field="owning_lib"/>
9739                 </retrieve>
9740                 <update permission="URL_VERIFY">
9741                     <context link="session" field="owning_lib"/>
9742                 </update>
9743                 <delete permission="URL_VERIFY">
9744                     <context link="session" field="owning_lib"/>
9745                 </delete>
9746             </actions>
9747         </permacrud>
9748
9749     </class>
9750
9751     <class
9752         id="uvva"
9753         controller="open-ils.cstore open-ils.pcrud"
9754         oils_obj:fieldmapper="url_verify::verification_attempt"
9755         oils_persist:tablename="url_verify.verification_attempt"
9756         reporter:label="URL Verification Attempt"
9757     >
9758         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9759             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9760                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9761                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9762             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9763             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9764         </fields>
9765
9766         <links>
9767             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9768             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9769         </links>
9770
9771         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9772             <actions>
9773                 <create permission="URL_VERIFY">
9774                     <context link="session" field="owning_lib"/>
9775                 </create>
9776                 <retrieve permission="URL_VERIFY">
9777                     <context link="session" field="owning_lib"/>
9778                 </retrieve>
9779                 <update permission="URL_VERIFY">
9780                     <context link="session" field="owning_lib"/>
9781                 </update>
9782                 <delete permission="URL_VERIFY">
9783                     <context link="session" field="owning_lib"/>
9784                 </delete>
9785             </actions>
9786         </permacrud>
9787
9788     </class>
9789
9790     <class
9791         id="uvuv"
9792         controller="open-ils.cstore open-ils.pcrud"
9793         oils_obj:fieldmapper="url_verify::url_verification"
9794         oils_persist:tablename="url_verify.url_verification"
9795         reporter:label="URL Verification"
9796     >
9797         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9798             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9799                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9800                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9801             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9802             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9803             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9804             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9805                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9806         </fields>
9807
9808         <links>
9809             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9810             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9811             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9812         </links>
9813
9814         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9815             <actions>
9816                 <create permission="URL_VERIFY">
9817                     <context link="attempt" jump="session" field="owning_lib"/>
9818                 </create>
9819                 <retrieve permission="URL_VERIFY">
9820                     <context link="attempt" jump="session" field="owning_lib"/>
9821                 </retrieve>
9822                 <update permission="URL_VERIFY">
9823                     <context link="attempt" jump="session" field="owning_lib"/>
9824                 </update>
9825                 <delete permission="URL_VERIFY">
9826                     <context link="attempt" jump="session" field="owning_lib"/>
9827                 </delete>
9828             </actions>
9829         </permacrud>
9830
9831     </class>
9832
9833         <class
9834                 id="cfdi"
9835                 controller="open-ils.cstore open-ils.pcrud"
9836                 oils_obj:fieldmapper="config::filter_dialog_interface"
9837                 oils_persist:tablename="config.filter_dialog_interface"
9838                 reporter:label="FilterDialog Interface">
9839                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9840                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9841                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9842                 </fields>
9843                 <links>
9844                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9845                 </links>
9846                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9847                         <actions>
9848                                 <retrieve />
9849                         </actions>
9850                 </permacrud>
9851         </class>
9852
9853         <class
9854                 id="cfdfs"
9855                 controller="open-ils.cstore open-ils.pcrud"
9856                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9857                 oils_persist:tablename="config.filter_dialog_filter_set"
9858                 reporter:label="FilterDialog Filter Set">
9859                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9860                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9861                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9862                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9863                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9864                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9865                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9866                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9867                 </fields>
9868                 <links>
9869                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9870                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9871                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9872                 </links>
9873                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9874                         <actions>
9875                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9876                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9877                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9878                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9879                         </actions>
9880                 </permacrud>
9881
9882         </class>
9883
9884         <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">
9885                 <fields oils_persist:primary="code">
9886                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9887                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9888                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9889                 </fields>
9890                 <links/>
9891                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9892                         <actions>
9893                                 <retrieve/>
9894                         </actions>
9895                 </permacrud>
9896         </class>
9897
9898         <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">
9899                 <oils_persist:source_definition>
9900
9901             SELECT  b.id,
9902                     MAX(dcp.edit_date) AS last_delete_date
9903              FROM   biblio.record_entry b
9904                     JOIN asset.call_number cn ON (cn.record = b.id)
9905                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9906              WHERE  NOT b.deleted
9907              GROUP BY b.id
9908              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9909
9910                 </oils_persist:source_definition>
9911                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9912                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9913                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9914                 </fields>
9915                 <links>
9916                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9917                 </links>
9918                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9919                         <actions>
9920                                 <retrieve/>
9921                         </actions>
9922                 </permacrud>
9923         </class>
9924
9925         <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">
9926                 <oils_persist:source_definition>
9927
9928             -- -- 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.
9929             -- -- 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
9930             -- -- may not.
9931             -- SELECT
9932             --     bre.id AS "bib_id",
9933             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9934             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9935             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9936             -- FROM (
9937                 SELECT
9938                     y.bre AS "id",
9939                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9940                     y.hold_count AS "hold_count",
9941                     (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"
9942                 FROM (
9943                         SELECT
9944                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9945                             COUNT(*) AS "hold_count"
9946                         FROM action.hold_request h
9947                         WHERE
9948                             cancel_time IS NULL
9949                             AND fulfillment_time IS NULL
9950                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9951                         GROUP BY 1
9952                     )y LEFT JOIN (
9953                         SELECT 
9954                             (SELECT id
9955                                 FROM biblio.record_entry 
9956                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9957                             ) AS "bre", 
9958                             COUNT(*) AS "copy_count"
9959                         FROM asset.copy
9960                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9961                         WHERE copy.holdable 
9962                             AND NOT copy.deleted 
9963                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9964                         GROUP BY 1
9965                     )x ON x.bre = y.bre
9966                 -- )z RIGHT JOIN (
9967                 --     SELECT id
9968                 --     FROM biblio.record_entry
9969                 --     WHERE NOT deleted
9970                 -- )bre ON (z.bib_id = bre.id)
9971                 
9972
9973                 </oils_persist:source_definition>
9974                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9975                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9976                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9977                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9978                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9979                 </fields>
9980                 <links>
9981                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9982                 </links>
9983                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9984                         <actions>
9985                                 <retrieve/>
9986                         </actions>
9987                 </permacrud>
9988         </class>
9989
9990         <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">
9991                 <oils_persist:source_definition>
9992             SELECT *,
9993                 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,
9994                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9995             FROM
9996                 (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
9997                     FROM
9998                         action.hold_request ahr
9999                         JOIN reporter.hold_request_record rhrr USING (id)
10000                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10001                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10002                     WHERE
10003                         ahr.cancel_time IS NULL
10004                         AND ahr.fulfillment_time IS NULL
10005                     GROUP BY bib_record, pickup_lib
10006                 )x
10007                 JOIN
10008                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10009                     FROM
10010                         action.hold_request ahr
10011                         JOIN reporter.hold_request_record rhrr USING (id)
10012                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10013                     WHERE
10014                         ahr.cancel_time IS NULL
10015                         AND ahr.fulfillment_time IS NULL
10016                     GROUP BY bib_record
10017                 )y
10018                 USING (id)
10019                 </oils_persist:source_definition>
10020                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10021                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10022                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10023                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10024                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10025                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10026                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10027                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10028                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10029                 </fields>
10030                 <links>
10031                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10032                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10033                 </links>
10034                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10035                         <actions>
10036                                 <retrieve/>
10037                         </actions>
10038                 </permacrud>
10039         </class>
10040
10041         <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">
10042                 <oils_persist:source_definition>
10043             SELECT
10044                 ac.id,
10045                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10046                 MAX(actac.xact_start) AS last_circ
10047             FROM asset.copy ac
10048                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10049             GROUP BY ac.id
10050
10051             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10052             --SELECT
10053             --    ac.id,
10054             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10055             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10056             --FROM asset.copy ac
10057             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10058             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10059             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10060                 </oils_persist:source_definition>
10061                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10062                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10063                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10064                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10065                 </fields>
10066                 <links>
10067                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10068                 </links>
10069                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10070                         <actions>
10071                                 <retrieve/>
10072                         </actions>
10073                 </permacrud>
10074         </class>
10075
10076         <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">
10077                 <fields oils_persist:primary="id">
10078                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10079                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10080                 </fields>
10081                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10082                         <actions>
10083                                 <retrieve/>
10084                         </actions>
10085                 </permacrud>
10086         </class>
10087
10088         <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">
10089                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10090                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10091                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10092                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10093                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10094                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10095                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10096                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10097                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10098                 </fields>
10099                 <links>
10100                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10101                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10102                 </links>
10103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10104                         <actions>
10105                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10106                                 <retrieve/>
10107                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10108                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10109                         </actions>
10110                 </permacrud>
10111         </class>
10112
10113         <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">
10114                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10115                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10116                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10117                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10118                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10119                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10120                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10121                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10122                 </fields>
10123                 <links>
10124                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10125                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10126                 </links>
10127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10128                         <actions>
10129                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10130                                 <retrieve/>
10131                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10132                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10133                         </actions>
10134                 </permacrud>
10135         </class>
10136
10137
10138         <!-- ********************************************************************************************************************* -->
10139         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10140         <!-- ********************************************************************************************************************* -->
10141         <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">
10142                 <fields oils_persist:primary="id">
10143                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10144                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10145                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10146                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10147                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10148                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10149                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10150                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10151                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10152                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10153                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10154                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10155                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10156                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10157                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10158                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10159                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10160                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10161                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10162                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10163                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10164                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10165                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10166                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10167                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10168                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10169                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10170                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10171                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10172                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10173                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10174                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10175                 </fields>
10176                 <links>
10177                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10178                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10179                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10180                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10181                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10182                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10183                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10184                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10185                 </links>
10186         </class>
10187
10188         <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">
10189                 <fields oils_persist:primary="id">
10190                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10191                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10192                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10193                 </fields>
10194                 <links>
10195                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10196                 </links>
10197         </class>
10198
10199         <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">
10200                 <fields oils_persist:primary="id">
10201                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10202                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10203                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10204                 </fields>
10205                 <links>
10206                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10207                 </links>
10208         </class>
10209
10210         <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">
10211                 <fields oils_persist:primary="id">
10212                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10213
10214                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10215                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10216                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10217
10218                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10219                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10220                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10221
10222                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10223                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10224
10225                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10226                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10227                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10228
10229                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10230                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10231
10232                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10233                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10234                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10235
10236                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10237                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10238                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10239
10240                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10241                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10242                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10243                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10244
10245                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10246                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10247
10248                 </fields>
10249                 <links>
10250                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10251                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10252                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10253                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10254                 </links>
10255         </class>
10256
10257         <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">
10258                 <oils_persist:source_definition>
10259
10260             SELECT
10261                 po.ordering_agency AS ordering_agency,
10262                 po.id AS purchase_order,
10263                 li.id AS lineitem,
10264                 lid.id AS lineitem_detail,
10265                 cpa.id AS claim_policy_action
10266             FROM
10267                 acq.lineitem_detail lid
10268                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10269                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10270                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10271                 JOIN acq.claim_policy_action cpa ON (
10272                     cpa.claim_policy = cp.id
10273
10274                     -- we only care about claim policy actions whose claim
10275                     -- interval we'd reached or exceeded
10276                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10277
10278                     -- filter out all claim policy actions where claim events
10279                     -- have occurred on or after the action's action_interval
10280                     AND NOT EXISTS (
10281                         SELECT 1
10282                         FROM
10283                             acq.claim_event evt
10284                             JOIN acq.claim claim ON (
10285                                 claim.id = evt.claim
10286                                 AND claim.lineitem_detail = lid.id
10287                             )
10288                         WHERE
10289                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10290                     )
10291                 )
10292             WHERE
10293                 lid.cancel_reason IS NULL
10294                 AND li.cancel_reason IS NULL -- belt/suspenders
10295                 AND po.cancel_reason IS NULL -- belt/suspenders
10296                 AND lid.recv_time IS NULL
10297                 AND po.state = 'on-order'
10298             ORDER BY 1, 2, 3, 4, 5
10299
10300                 </oils_persist:source_definition>
10301                 <fields>
10302                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10303                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10304                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10305                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10306                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10307                 </fields>
10308                 <links>
10309                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10310                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10311                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10312                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10313                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10314                 </links>
10315         </class>
10316         <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">
10317                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10318                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10319                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10320                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10321                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10322                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10323                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10324                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10325                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10326                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10327                 </fields>
10328                 <links>
10329                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10330                 </links>
10331     </class>
10332         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10333                 <oils_persist:source_definition>
10334             SELECT * FROM acq.lineitem_summary 
10335                                 WHERE item_count > (invoice_count + cancel_count)
10336         </oils_persist:source_definition>
10337                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10338                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10339                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10340                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10341                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10342                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10343                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10344                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10345                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10346                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10347                 </fields>
10348                 <links>
10349                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10350                 </links>
10351     </class>
10352         <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">
10353                 <oils_persist:source_definition>
10354
10355                         SELECT  t.*
10356                           FROM  action.transit_copy t
10357                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10358                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10359                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10360
10361                 </oils_persist:source_definition>
10362                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10363                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10364                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10365                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10366                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10367                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10368                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10369                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10370                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10371                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10372                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10373                 </fields>
10374                 <links>
10375                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10376                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10377                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10378                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10379                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10380                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10381                 </links>
10382         </class>
10383
10384     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10385                 <oils_persist:source_definition>
10386
10387         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10388                 SELECT
10389                         cp.id as copy,
10390                         COUNT(circ.id),
10391                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10392                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10393                 FROM
10394                         asset.copy cp
10395                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10396                 GROUP BY 1, 3, 4
10397                 UNION
10398                 SELECT
10399                         cp.id as copy,
10400                         COUNT(circ.id),
10401                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10402                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10403                 FROM
10404                         asset.copy cp
10405                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10406                 GROUP BY 1, 3, 4
10407                 UNION
10408                 SELECT
10409                         id as copy,
10410                         circ_count,
10411                         -1 AS year,
10412                         false as is_renewal
10413                 FROM
10414                         extend_reporter.legacy_circ_count
10415         )x GROUP BY 1, 3, 4
10416
10417                 </oils_persist:source_definition>
10418         <fields>
10419             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10420             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10421             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10422             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10423         </fields>
10424                 <links>
10425                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10426                 </links>
10427                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10428                         <actions>
10429                                 <retrieve/>
10430                         </actions>
10431                 </permacrud>
10432     </class>
10433
10434         <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">
10435                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10436                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10437                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10438                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10439                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10440                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10441                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10442                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10443                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10444                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10445                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10446                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10447                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10448                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10449                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10450                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10451                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10452                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10453                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10454                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10455                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10456                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10457                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10458                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10459                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10460                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10461                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10462                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10463                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10464                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10465                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10466                 </fields>
10467                 <links>
10468                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10469                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10470                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10471                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10472                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10473                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10474                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10475                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10476                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10477                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10478                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10479                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10480                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10481                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10482                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10483                 </links>
10484         </class>
10485
10486     <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">
10487         <fields oils_persist:primary="id">
10488             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10489             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10490             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10491             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10492             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10493             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10494             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10495             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10496             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10497             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10498             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10499             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10500             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10501             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10502             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10503             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10504             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10505             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10506             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10507             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10508             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10509             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10510             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10511             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10512             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10513             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10514             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10515             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10516             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10517             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10518             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10519             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10520             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10521             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10522         </fields>
10523         <links>
10524             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10525             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10526             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10527             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10528             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10529         </links>
10530     </class>
10531
10532     <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">
10533         <fields oils_persist:primary="id">
10534             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10535             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10536             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10537             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10538         </fields>
10539         <links>
10540             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10541             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10542         </links>
10543     </class>
10544
10545     <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">
10546         <fields oils_persist:primary="owning_lib">
10547             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10548             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10549             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10550         </fields>
10551         <links>
10552             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10553         </links>
10554     </class>
10555
10556     <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">
10557         <fields oils_persist:primary="id">
10558             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10559             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10560             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10561             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10562             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10563         </fields>
10564         <links>
10565             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10566             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10567             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10568         </links>
10569     </class>
10570
10571     <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">
10572         <fields oils_persist:primary="circ_lib">
10573             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10574             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10575             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10576             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10577         </fields>
10578         <links>
10579             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10580             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10581         </links>
10582     </class>
10583
10584     <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">
10585         <fields oils_persist:primary="id">
10586             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10587             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10588             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10589             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10590             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10591         </fields>
10592         <links>
10593             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10594             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10595             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10596         </links>
10597     </class>
10598
10599     <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">
10600         <fields oils_persist:primary="home_ou">
10601             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10602             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10603             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10604             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10605         </fields>
10606         <links>
10607             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10608             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10609         </links>
10610     </class>
10611         <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">
10612                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10613                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10614                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10615                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10616                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10617                 </fields>
10618                 <links>
10619                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10620                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10621                 </links>
10622                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10623                         <actions>
10624                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10625                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10626                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10627                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10628                         </actions>
10629                 </permacrud>
10630         </class>
10631         <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">
10632                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10633                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10634                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10635                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10636                 </fields>
10637                 <links>
10638                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10639                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10640                         </links>
10641                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10642                 <actions>
10643                                 <create permission="ADMIN_ACQ_FUND_TAG">
10644                                         <context link="tag" field="owner"/>
10645                                 </create>
10646                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10647                                         <context link="tag" field="owner"/>
10648                                 </retrieve>
10649                                 <update permission="ADMIN_ACQ_FUND_TAG">
10650                                         <context link="tag" field="owner"/>
10651                                 </update>
10652                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10653                                         <context link="tag" field="owner"/>
10654                                 </delete>
10655                         </actions>
10656                 </permacrud>
10657         </class>
10658         <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">
10659                 <oils_persist:source_definition><![CDATA[
10660                 SELECT
10661                         poi.purchase_order AS purchase_order,
10662                         ii.invoice AS invoice,
10663                         NULL AS lineitem,
10664                         poi.id AS po_item,
10665                         NULL AS picklist
10666                 FROM
10667                         acq.po_item poi
10668                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10669                 UNION SELECT
10670                         jub.purchase_order AS purchase_order,
10671                         ie.invoice AS invoice,
10672                         jub.id AS lineitem,
10673                         NULL AS po_item,
10674                         jub.picklist AS picklist
10675                 FROM
10676                         acq.lineitem jub
10677                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10678                 UNION SELECT
10679                         ii.purchase_order AS purchase_order,
10680                         ii.invoice AS invoice,
10681                         NULL AS lineitem,
10682                         NULL AS po_item,
10683                         NULL AS picklist
10684                 FROM
10685                         acq.invoice_item ii
10686                 WHERE ii.po_item IS NULL
10687                 UNION SELECT
10688                         ie.purchase_order AS purchase_order,
10689                         ie.invoice AS invoice,
10690                         NULL AS lineitem,
10691                         NULL AS po_item,
10692                         NULL AS picklist
10693                 FROM
10694                         acq.invoice_entry ie
10695                 WHERE ie.lineitem IS NULL
10696                 UNION SELECT
10697                         NULL AS purchase_order,
10698                         NULL AS invoice,
10699                         jub.id AS lineitem,
10700                         NULL AS po_item,
10701                         jub.picklist AS picklist
10702                 FROM
10703                         acq.lineitem jub
10704                 WHERE jub.purchase_order IS NULL
10705                 ]]></oils_persist:source_definition>
10706                 <fields>
10707                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10708                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10709                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10710                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10711                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10712                 </fields>
10713                 <links>
10714                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10715                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10716                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10717                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10718                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10719                 </links>
10720         </class>
10721         <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">
10722                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10723                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10724                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10725                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10726                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10727                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10728                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10729                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10730                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10731                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10732                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10733                 </fields>
10734                 <links>
10735                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10736                 </links>
10737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10738                         <actions>
10739                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10740                                 <retrieve/>
10741                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10742                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10743                         </actions>
10744                 </permacrud>
10745         </class>
10746
10747         <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">
10748                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10749                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10750                         <field name="date_applied" reporter:datatype="timestamp"/>
10751                         <field name="org" reporter:datatype="org_unit"/>
10752                         <field name="original_value" reporter:datatype="text"/>
10753                         <field name="new_value" reporter:datatype="text"/>
10754                         <field name="field_name" reporter:datatype="link"/>
10755                 </fields>
10756                 <links>
10757                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10758                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10759                 </links>
10760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10761                         <actions>
10762                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10763                                 <retrieve/>
10764                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10765                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10766                         </actions>
10767                 </permacrud>
10768         </class>
10769         <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">
10770                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10771                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10772                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10773                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10774                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10775                 </fields>
10776                 <links>
10777                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10778                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10779                 </links>
10780         </class>
10781         <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">
10782                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10783                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10784                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10785                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10786                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10787                 </fields>
10788                 <links>
10789                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10790                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10791                 </links>
10792         </class>
10793
10794
10795         <!-- ********************************************************************************************************************* -->
10796
10797 </IDL>
10798
10799 <!--
10800     vim:noet:ts=4:sw=4:
10801 -->