]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
MARC import tag stripping : SQL / IDL
[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                 </fields>
374                 <links>
375                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
376                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
377                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
378                 </links>
379                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
380                         <actions>
381                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
382                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
383                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
384                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
385                         </actions>
386                 </permacrud>
387         </class>
388
389         <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">
390                 <fields oils_persist:primary="code">
391                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
392                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
393                 </fields>
394                 <links>
395                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
396                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
397                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
398                 </links>
399                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
400                         <actions>
401                                 <retrieve/>
402                         </actions>
403                 </permacrud>
404         </class>
405
406         <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">
407                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
408                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
409                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
410                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
411                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
412                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
413                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
414                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
415                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
416                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
417                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
418                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
419                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
420                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
421                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
422                 </fields>
423                 <links>
424                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
425                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
426                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
427                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
428             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
429             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
430             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
431                 </links>
432                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
433                         <actions>
434                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
435                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
436                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
437                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
438                         </actions>
439                 </permacrud>
440         </class>
441
442         <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">
443                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
444                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
445                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
446                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
447                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
448                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
449                 </fields>
450                 <links/>
451                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
452                         <actions>
453                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
454                 <retrieve/>
455                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
456                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
457                         </actions>
458                 </permacrud>
459         </class>
460
461         <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">
462                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
463                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
464                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
465                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
466                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
467                 </fields>
468                 <links>
469                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
470                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
471                 </links>
472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
473                         <actions>
474                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
475                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
476                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
477                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
478                         </actions>
479                 </permacrud>
480         </class>
481
482         <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">
483                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
484                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
485                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
486                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
487                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
488                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
489                 </fields>
490                 <links>
491                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
492                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
493                 </links>
494                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
495                         <actions>
496                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
497                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
498                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
499                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
500                         </actions>
501                 </permacrud>
502         </class>
503
504         <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">
505                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
506                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
507                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
508                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
509                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
510                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
511                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
512                 </fields>
513                 <links>
514                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
515                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
516                 </links>
517                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
518                         <actions>
519                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
522                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                         </actions>
524                 </permacrud>
525         </class>
526
527         <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">
528                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
529                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
530                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
531                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
532                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
533                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
534                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
535                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
536                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
537                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
538                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
539                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
540                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
541                 </fields>
542                 <links>
543                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
544                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
545                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
546             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
547             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
548                 </links>
549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
550                         <actions>
551                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
552                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
553                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
554                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                         </actions>
556                 </permacrud>
557         </class>
558
559         <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">
560                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
561                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
562                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
563                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
564                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
565                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
566                 </fields>
567                 <links/>
568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
569                         <actions>
570                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
571                 <retrieve/>
572                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
573                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                         </actions>
575                 </permacrud>
576         </class>
577
578         <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">
579                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
580                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
581                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
582                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
583                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
584                 </fields>
585                 <links>
586                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
587                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
588                 </links>
589                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
590                         <actions>
591                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
592                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
593                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
594                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                         </actions>
596                 </permacrud>
597         </class>
598
599         <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">
600                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
601                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
602                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
603                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
604                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
605                 </fields>
606                 <links>
607                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
608                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
609                 </links>
610                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
611                         <actions>
612                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
613                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
614                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
615                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
616                         </actions>
617                 </permacrud>
618         </class>
619
620         <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">
621                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
622                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
623                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
624                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
625                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
626                 </fields>
627                 <links>
628                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
629                 </links>
630                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
631                         <actions>
632                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
633                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
634                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
635                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
636                         </actions>
637                 </permacrud>
638         </class>
639
640         <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">
641                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
642                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
643                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
644                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
645                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
646                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
647                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
648                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
649             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
650                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
651                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
652                 </fields>
653                 <links>
654                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
655                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
656                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
657                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
658                 </links>
659                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
660                         <actions>
661                                 <create permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </create>
664                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </retrieve>
667                                 <update permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </update>
670                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
671                     <context link="match_set" field="owner"/>
672                                 </delete>
673                         </actions>
674                 </permacrud>
675         </class>
676
677         <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">
678                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
679                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
680                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
681                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
682                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
683                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
684                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
685                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
686                 </fields>
687                 <links>
688                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
689                 </links>
690                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
691                         <actions>
692                                 <create permission="ADMIN_IMPORT_MATCH_SET">
693                     <context link="match_set" field="owner"/>
694                                 </create>
695                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
696                     <context link="match_set" field="owner"/>
697                                 </retrieve>
698                                 <update permission="ADMIN_IMPORT_MATCH_SET">
699                     <context link="match_set" field="owner"/>
700                                 </update>
701                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
702                     <context link="match_set" field="owner"/>
703                                 </delete>
704                         </actions>
705                 </permacrud>
706         </class>
707
708         <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">
709                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
710                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
711                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
712                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
713                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
714                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
715                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
716                 </fields>
717                 <links>
718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
720                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
721                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
722                 </links>
723         </class>
724
725     <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">
726         <fields oils_persist:primary="name">
727             <field reporter:label="Name" name="name" reporter:datatype="text"/>
728             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
729             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
730             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
731         </fields>
732         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
733             <actions>
734                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
735                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
736                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
737                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
738             </actions>
739         </permacrud>
740     </class>
741
742     <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">
743         <fields oils_persist:primary="id">
744             <field reporter:label="ID" name="id" reporter:datatype="id"/>
745             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
746             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
747             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
748             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
749         </fields>
750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
751             <actions>
752                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
753                 <retrieve/>
754                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
755                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
756             </actions>
757         </permacrud>
758     </class>
759
760         <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">
761                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
762                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
763                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
764                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
765                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
766                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
767                 </fields>
768                 <links>
769                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
770                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
771                 </links>
772         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
773             <actions>
774                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
775                 <retrieve/>
776                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
777                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
778             </actions>
779         </permacrud>
780         </class>
781
782         <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">
783                 <fields oils_persist:primary="name">
784                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
785                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
786                         <field reporter:label="Description" name="description" reporter:datatype="text" />
787                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
788                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
789                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
790                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
791                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
792                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
793                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
794                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
795                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
796                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
797                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
798                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
799                 </fields>
800                 <links>
801                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
802                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
803                 </links>
804         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
805             <actions>
806                 <create permission="ADMIN_SVF" global_required="true"/>
807                 <retrieve/>
808                 <update permission="ADMIN_SVF" global_required="true"/>
809                 <delete permission="ADMIN_SVF" global_required="true"/>
810             </actions>
811         </permacrud>
812         </class>
813
814         <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">
815                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
818                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
819             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
820                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
821                 </fields>
822                 <links/>
823         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
824             <actions>
825                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
826                 <retrieve/>
827                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
828                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
829             </actions>
830         </permacrud>
831         </class>
832
833         <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">
834                 <fields oils_persist:primary="id">
835                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
836                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
837                 </fields>
838                 <links>
839                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
840                 </links>
841         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
842             <actions>
843                 <retrieve/>
844             </actions>
845         </permacrud>
846         </class>
847
848         <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">
849                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
850                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
851                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
852                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
853                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
854                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
855                 </fields>
856                 <links>
857                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
858                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
859                 </links>
860         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
861             <actions>
862                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
863                 <retrieve/>
864                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
865                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
866             </actions>
867         </permacrud>
868         </class>
869
870         <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">
871                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
872                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
873                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
874                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
875                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
876                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
877                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
878                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
879             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
880                 </fields>
881                 <links>
882                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
883                 </links>
884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
885             <actions>
886                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
887                 <retrieve/>
888                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
889                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
890             </actions>
891         </permacrud>
892         </class>
893
894         <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">
895                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
896                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
897                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
898                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
899                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
900                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
901                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
902                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
903                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
904                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
905                 </fields>
906                 <links>
907                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
908                 </links>
909         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
910             <actions>
911                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
912                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
913                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
914                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
915             </actions>
916         </permacrud>
917         </class>
918
919     <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">
920         <fields oils_persist:primary="name">
921             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
922             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
923             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
924             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
925             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
926             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
927             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
928             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
929             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
930             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
931         </fields>
932         <links>
933             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
934             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
935         </links>
936         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
937             <actions>
938                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
939                 <retrieve/>
940                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
941                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
942             </actions>
943         </permacrud>
944     </class>
945
946     <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">
947         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
948             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
949             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
950             <field reporter:label="Name" name="name" reporter:datatype="text"/>
951             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
952             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
953             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
954             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
955         </fields>
956         <links>
957             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
958         </links>
959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
960             <actions>
961                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
962                 <retrieve/>
963                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
964                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
965             </actions>
966         </permacrud>
967     </class>
968
969         <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">
970                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
971                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
972                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
973                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
974                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
975                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
976                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
977                 </fields>
978                 <links>
979             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
980             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
981                 </links>
982                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
983                         <actions>
984                                 <retrieve/>
985                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
986                         </actions>
987                 </permacrud>
988         </class>
989
990         <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">
991                 <fields oils_persist:primary="key">
992                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
993                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
994                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
995                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
996                 </fields>
997                 <links/>
998                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
999                         <actions>
1000                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1001                                 <retrieve/>
1002                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1003                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1004                         </actions>
1005                 </permacrud>
1006         </class>
1007
1008         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1009                 <fields oils_persist:primary="module">
1010                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1011                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1012                 </fields>
1013                 <links/>
1014         </class>
1015
1016         <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">
1017                 <fields oils_persist:primary="module">
1018                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1019                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1020                 </fields>
1021                 <links/>
1022                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1023                         <actions>
1024                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1025                                 <retrieve/>
1026                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1027                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1028                         </actions>
1029                 </permacrud>
1030         </class>
1031
1032         <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">
1033                 <fields oils_persist:primary="module">
1034                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1035                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1036                 </fields>
1037                 <links/>
1038                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1039                         <actions>
1040                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1041                                 <retrieve/>
1042                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1043                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1044                         </actions>
1045                 </permacrud>
1046         </class>
1047
1048         <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">
1049                 <fields oils_persist:primary="module">
1050                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1051                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1052                 </fields>
1053                 <links/>
1054                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1055                         <actions>
1056                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1057                                 <retrieve/>
1058                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1059                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1060                         </actions>
1061                 </permacrud>
1062         </class>
1063
1064         <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">
1065                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1066                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1067                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1068                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1069                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1070                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1071                 </fields>
1072                 <links>
1073                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1074                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1075                 </links>
1076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1077                         <actions>
1078                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1079                     <context link="event_def" field="owner"/>
1080                 </create>
1081                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1082                     <context link="event_def" field="owner"/>
1083                 </retrieve>
1084                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1085                     <context link="event_def" field="owner"/>
1086                 </update>
1087                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1088                     <context link="event_def" field="owner"/>
1089                 </delete>
1090                         </actions>
1091                 </permacrud>
1092         </class>
1093
1094         <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">
1095                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1096                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1097                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1098                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1099                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1100                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1101                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1102                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1103                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1104                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1105                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1106                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1107                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1108                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1109                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1110                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1111                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1112                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1113                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1114                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1115                 </fields>
1116                 <links>
1117                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1118                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1119                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1120                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1121                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1122                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1123                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1124                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1125                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1126                 </links>
1127                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1128                         <actions>
1129                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1130                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1131                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1132                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1133                         </actions>
1134                 </permacrud>
1135         </class>
1136
1137         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1138                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1139                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1140                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1141                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1142                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1143                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1144                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1145                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1146                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1147                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1148                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1149                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1150                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1151                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1152                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1153                 </fields>
1154                 <links>
1155                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1156                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1157                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1158                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1159                 </links>
1160         </class>
1161
1162         <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">
1163                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1164                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1165                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1166                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1167                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1168                 </fields>
1169                 <links>
1170                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1171                 </links>
1172                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1173                         <actions>
1174                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1175                     <context link="event_def" field="owner"/>
1176                 </create>
1177                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1178                     <context link="event_def" field="owner"/>
1179                 </retrieve>
1180                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1181                     <context link="event_def" field="owner"/>
1182                 </update>
1183                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1184                     <context link="event_def" field="owner"/>
1185                 </delete>
1186                         </actions>
1187                 </permacrud>
1188         </class>
1189
1190         <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">
1191                 <oils_persist:source_definition><![CDATA[
1192                 SELECT  atevdef.hook,
1193                         atevdef.name,
1194                         atevdef.reactor,
1195                         atev.id,
1196                         atev.event_def,
1197                         atev.add_time,
1198                         atev.run_time,
1199                         atev.start_time,
1200                         atev.update_time,
1201                         atev.complete_time,
1202                         atev.update_process,
1203                         atev.state,
1204                         atev.user_data,
1205                         atev.template_output,
1206                         atev.error_output,
1207                         atev.async_output,
1208                         targ_circ.id AS target_circ,
1209                         targ_ahr.id AS target_hold,
1210                         COALESCE(
1211                                 targ_circ.circ_lib,
1212                                 targ_ahr.pickup_lib
1213                         ) AS perm_lib
1214                 FROM action_trigger.event atev
1215                 JOIN action_trigger.event_definition atevdef ON
1216                         (atevdef.id = atev.event_def)
1217                 JOIN action_trigger.hook ath ON
1218                         (ath.key = atevdef.hook)
1219                 LEFT JOIN action.circulation targ_circ ON
1220                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1221                 LEFT JOIN action.hold_request targ_ahr ON
1222                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1223                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1224                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1225                                 'circ.staff.max_visible_event_age',
1226                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1227                         ) UNION
1228                         SELECT '1000 YEARS'::INTERVAL AS value
1229                 ) ous)
1230                 ]]></oils_persist:source_definition>
1231                 <fields oils_persist:primary="id">
1232                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1233                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1234                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1235                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1236                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1237                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1238                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1239                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1240                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1241                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1242                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1243                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1244                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1245                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1246                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1247                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1248                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1249                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1250                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1251                 </fields>
1252                 <links>
1253                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1254                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1255                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1256                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1257                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1258                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1259                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1260                 </links>
1261                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1262                         <actions>
1263                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1264                         </actions>
1265                 </permacrud>
1266         </class>
1267
1268         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1269                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1270                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1271                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1272                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1273                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1274                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1275                 </fields>
1276                 <links>
1277                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1278                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1279                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1280                 </links>
1281         </class>
1282
1283         <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">
1284                 <fields oils_persist:primary="code">
1285                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1286                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1287                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1288                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1289                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1290                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1291                 </fields>
1292                 <links/>
1293         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1294             <actions>
1295                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1296                 <retrieve/>
1297                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1298                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1299             </actions>
1300         </permacrud>
1301         </class>
1302
1303         <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">
1304                 <fields oils_persist:primary="code">
1305                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1306                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1307                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1308                 </fields>
1309                 <links/>
1310         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1311             <actions>
1312                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1313                 <retrieve/>
1314                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1315                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1316             </actions>
1317         </permacrud>
1318         </class>
1319
1320         <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">
1321                 <fields oils_persist:primary="code">
1322                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1323                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1324                 </fields>
1325                 <links/>
1326         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1327             <actions>
1328                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1329                 <retrieve/>
1330                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1331                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1332             </actions>
1333         </permacrud>
1334         </class>
1335
1336         <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">
1337                 <fields oils_persist:primary="code">
1338                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1339                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1340                 </fields>
1341                 <links/>
1342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1343             <actions>
1344                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1345                 <retrieve/>
1346                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1347                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1348             </actions>
1349         </permacrud>
1350         </class>
1351
1352         <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">
1353                 <fields oils_persist:primary="code">
1354                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1355                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1356                 </fields>
1357                 <links/>
1358         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1359             <actions>
1360                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1361                 <retrieve/>
1362                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1363                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1364             </actions>
1365         </permacrud>
1366         </class>
1367
1368         <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">
1369                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1370                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1371                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1372                 </fields>
1373                 <links/>
1374         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1375             <actions>
1376                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1377                 <retrieve/>
1378                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1379                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1380             </actions>
1381         </permacrud>
1382         </class>
1383
1384         <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">
1385                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1386                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1387                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1388                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1389                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1390                 </fields>
1391         <links>
1392             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1393             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1394             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1395         </links>
1396         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1397             <actions>
1398                 <create permission="UPDATE_COPY">
1399                     <context link="target_copy" field="circ_lib"/>
1400                 </create>
1401                 <retrieve/>
1402                 <update permission="UPDATE_COPY">
1403                     <context link="target_copy" field="circ_lib"/>
1404                 </update>
1405                 <delete permission="UPDATE_COPY">
1406                     <context link="target_copy" field="circ_lib"/>
1407                 </delete>
1408             </actions>
1409         </permacrud>
1410         </class>
1411
1412         <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">
1413                 <fields oils_persist:primary="code">
1414                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1415                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1416                 </fields>
1417                 <links/>
1418         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1419             <actions>
1420                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1421                 <retrieve/>
1422                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1423                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1424             </actions>
1425         </permacrud>
1426         </class>
1427
1428         <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">
1429                 <fields oils_persist:primary="code">
1430                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1431                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1432                 </fields>
1433                 <links/>
1434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1435             <actions>
1436                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1437                 <retrieve/>
1438                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1439                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1440             </actions>
1441         </permacrud>
1442         </class>
1443
1444         <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">
1445                 <fields oils_persist:primary="code">
1446                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1447                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1448                 </fields>
1449                 <links/>
1450         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1451             <actions>
1452                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1453                 <retrieve/>
1454                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1455                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1456             </actions>
1457         </permacrud>
1458         </class>
1459
1460     <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">
1461         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1462             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1463             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1464             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1465             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1466             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1467             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1468             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1469             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1470             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1471             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1472             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1473             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1474             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1475             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1476             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1477             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1478             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1479         </fields>
1480         <links/>
1481         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1482             <actions>
1483                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1484                 <retrieve/>
1485                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1486                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1487             </actions>
1488         </permacrud>
1489     </class>
1490
1491     <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">
1492         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1493             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1494             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1495             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1496             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1497             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1498             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1499             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1500             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1501             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1502             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1503             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1504             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1505             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1506             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1507             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1508             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1509             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1510             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1511             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1512         </fields>
1513         <links/>
1514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1515             <actions>
1516                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1517                 <retrieve/>
1518                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1519                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1520             </actions>
1521         </permacrud>
1522     </class>
1523
1524     <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">
1525         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1526             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1527             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1528             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1529             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1530             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1531         </fields>
1532         <links>
1533             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1534             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1535             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1536         </links>
1537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1538             <actions>
1539                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1540                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1541                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1542                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1543             </actions>
1544         </permacrud>
1545     </class>
1546
1547         <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">
1548                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1549                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1550                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1551                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1552                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1553                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1554                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1555                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1556                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1557                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1558                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1559                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1560                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1561                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1562                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1563                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1564                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1565             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1566                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1567                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1568                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1569                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1570                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1571                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1572                 </fields>
1573                 <links>
1574                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1575                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1576                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1577                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1578                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1579                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1580                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1581                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1582                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1583                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1584                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1585                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1586                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1587             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1588                 </links>
1589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1590             <actions>
1591                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1592                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1593                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1594                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1595             </actions>
1596         </permacrud>
1597         </class>
1598
1599         <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">
1600                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1601                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1602                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1603                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1604                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1605                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1606                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1607                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1608                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1609                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1610                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1611                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1612                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1613                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1614                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1615                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1616             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1617                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1618                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1619             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1620                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1621                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1622                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1623                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1624             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1625             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1626             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1627                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1628                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1629                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1630                 </fields>
1631                 <links>
1632                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1633                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1634                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1635                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1636                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1637                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1638                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1639                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1640                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1641                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1642                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1643                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1644                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1645                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1646             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1647                 </links>
1648         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1649             <actions>
1650                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1651                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1652                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1653                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1654             </actions>
1655         </permacrud>
1656         </class>
1657
1658     <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">
1659         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1660             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1661             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1662             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1663         </fields>
1664         <links/>
1665         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1666             <actions>
1667                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1668                 <retrieve/>
1669                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1670                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1671             </actions>
1672         </permacrud>
1673     </class>
1674
1675     <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">
1676         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1677             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1678             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1679             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1680             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1681             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1682             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1683             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1684         </fields>
1685         <links>
1686             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1687         </links>
1688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1689             <actions>
1690                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1691                 <retrieve/>
1692                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1693                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1694             </actions>
1695         </permacrud>
1696     </class>
1697
1698     <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">
1699         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1700             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1701             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1702             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1703             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1704             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1705         </fields>
1706         <links>
1707             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1708             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1709         </links>
1710         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1711             <actions>
1712                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1713                     <context link="matchpoint" field="org_unit"/>
1714                 </create>
1715                 <retrieve/>
1716                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1717                     <context link="matchpoint" field="org_unit"/>
1718                 </update>
1719                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1720                     <context link="matchpoint" field="org_unit"/>
1721                 </delete>
1722             </actions>
1723         </permacrud>
1724     </class>
1725
1726     <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">
1727         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1728             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1729             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1730             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1731         </fields>
1732         <links>
1733             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1734             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1735         </links>
1736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1737             <actions>
1738                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1739                     <context link="limit_set" field="owning_lib"/>
1740                 </create>
1741                 <retrieve/>
1742                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1743                     <context link="limit_set" field="owning_lib"/>
1744                 </update>
1745                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1746                     <context link="limit_set" field="owning_lib"/>
1747                 </delete>
1748             </actions>
1749         </permacrud>
1750     </class>
1751     <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">
1752         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1753             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1754             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1755             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1756         </fields>
1757         <links>
1758             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1759             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1760         </links>
1761         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1762             <actions>
1763                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1764                     <context link="limit_set" field="owning_lib"/>
1765                 </create>
1766                 <retrieve/>
1767                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1768                     <context link="limit_set" field="owning_lib"/>
1769                 </update>
1770                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1771                     <context link="limit_set" field="owning_lib"/>
1772                 </delete>
1773             </actions>
1774         </permacrud>
1775     </class>
1776
1777     <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">
1778         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1779             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1780             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1781             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1782             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1783         </fields>
1784         <links>
1785             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1786             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1787         </links>
1788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1789             <actions>
1790                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1791                     <context link="limit_set" field="owning_lib"/>
1792                 </create>
1793                 <retrieve/>
1794                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1795                     <context link="limit_set" field="owning_lib"/>
1796                 </update>
1797                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1798                     <context link="limit_set" field="owning_lib"/>
1799                 </delete>
1800             </actions>
1801         </permacrud>
1802     </class>
1803
1804         <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">
1805                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1806                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1807                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1808                 </fields>
1809                 <links/>
1810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1811             <actions>
1812                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1813                 <retrieve/>
1814                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1815                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1816             </actions>
1817         </permacrud>
1818         </class>
1819
1820         <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">
1821                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1822                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1823                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1824                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1825                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1826                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1827                 </fields>
1828                 <links>
1829                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1830                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1831                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1832                 </links>
1833         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1834             <actions>
1835                 <create permission="ADMIN_SURVEY">
1836                     <context link="survey" field="owner"/>
1837                 </create>
1838                 <retrieve/>
1839                 <update permission="ADMIN_SURVEY">
1840                     <context link="survey" field="owner"/>
1841                 </update>
1842                 <delete permission="ADMIN_SURVEY">
1843                     <context link="survey" field="owner"/>
1844                 </delete>
1845             </actions>
1846         </permacrud>
1847         </class>
1848         <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">
1849                 <fields oils_persist:primary="id" oils_persist:sequence="">
1850                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1851                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1852                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1853                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1854                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1855                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1856                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1857                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1858                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1859                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1860                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1861                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1862                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1863                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1864                 </fields>
1865                 <links>
1866                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1867                 </links>
1868         </class>
1869         <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">
1870                 <fields oils_persist:primary="id" oils_persist:sequence="">
1871                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1872                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1873                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1874                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1875                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1876                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1877                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1878                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1879                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1880                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1881                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1882                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1883                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1884                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1885                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1886                 </fields>
1887                 <links>
1888                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1889                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1890                 </links>
1891         </class>
1892         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1893                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1894                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1895                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1896                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1897                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1898                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1899                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1900                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1901                 </fields>
1902                 <links>
1903                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1904                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1905                 </links>
1906         </class>
1907         <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">
1908                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1909                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1910                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1911                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1912                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1913                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1914                 </fields>
1915                 <links>
1916                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1917                 </links>
1918         </class>
1919         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1920                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1921                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1922                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1923                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1924                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1925                 </fields>
1926                 <links>
1927                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1928                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1929                 </links>
1930         </class>
1931         <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">
1932                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1933                         <field name="field" reporter:datatype="link"/>
1934                         <field name="id" reporter:datatype="id" />
1935                         <field name="source" reporter:datatype="link"/>
1936                         <field name="value" reporter:datatype="text"/>
1937                 </fields>
1938                 <links>
1939                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1940                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1941                 </links>
1942         </class>
1943         <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">
1944                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1945                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1946                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1947                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1948                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1949                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1950                 </fields>
1951                 <links>
1952                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1953                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1954                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1955                 </links>
1956         </class>
1957         <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">
1958                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1959                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1960                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1961                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1962                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1963                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1964                 </fields>
1965                 <links>
1966                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1967                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1968                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1969                 </links>
1970         </class>
1971         <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">
1972                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1973                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1974                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1975                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1976                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1977                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1978                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1979                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1980                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1981                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1982                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1983                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1984                 </fields>
1985                 <links>
1986                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1987                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1988                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1989                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1990                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1991                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1992                 </links>
1993         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1994             <actions>
1995                 <create permission="TRANSIT_COPY" context_field="owner">
1996                     <context link="target_copy" field="circ_lib"/>
1997                 </create>
1998                 <retrieve/>
1999                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2000                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2001             </actions>
2002         </permacrud>
2003         </class>
2004         <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">
2005                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2006                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2007                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2008                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2009                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2010                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2011                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2012                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2013                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2014                 </fields>
2015                 <links>
2016                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2017                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2018                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2019                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2020                 </links>
2021         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2022             <actions>
2023                 <create permission="ADMIN_SURVEY">
2024                     <context link="survey" field="owner"/>
2025                 </create>
2026                 <retrieve/>
2027                 <update permission="ADMIN_SURVEY">
2028                     <context link="survey" field="owner"/>
2029                 </update>
2030                 <delete permission="ADMIN_SURVEY">
2031                     <context link="survey" field="owner"/>
2032                 </delete>
2033             </actions>
2034         </permacrud>
2035         </class>
2036         <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">
2037                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2038                         <field name="bucket" />
2039                         <field name="id" reporter:datatype="id" />
2040                         <field name="target_copy" reporter:datatype="link"/>
2041                         <field name="create_time" reporter:datatype="timestamp" />
2042                         <field name="pos" reporter:datatype="int" />
2043                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2044                 </fields>
2045                 <links>
2046                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2047                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2048             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2049                 </links>
2050         </class>
2051         <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">
2052                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2053                         <field name="id" reporter:datatype="id" />
2054                         <field name="item" reporter:datatype="link"/>
2055                         <field name="note" reporter:datatype="text" />
2056                 </fields>
2057                 <links>
2058                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2059                 </links>
2060         </class>
2061
2062         <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">
2063                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2064                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2065                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2066                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2067                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2068                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2069                 </fields>
2070                 <links>
2071                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2072                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2073                 </links>
2074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2075                         <actions>
2076                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2077                                 <retrieve/>
2078                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2079                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2080                         </actions>
2081                 </permacrud>
2082         </class>
2083
2084         <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">
2085                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2086                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2087                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2088                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2089                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2090                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2091                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2092                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2093                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2094                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2095                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2096                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2097                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2098                 </fields>
2099                 <links>
2100                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2101                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2102                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2103                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2104                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2105                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2106                 </links>
2107                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2108                         <actions>
2109                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2110                                 <retrieve/>
2111                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2112                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2113                         </actions>
2114                 </permacrud>
2115         </class>
2116
2117         <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">
2118                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2119                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2120                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2121                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2122                 </fields>
2123                 <links>
2124                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2125                 </links>
2126                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2127                         <actions>
2128                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2129                                 <retrieve/>
2130                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2131                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2132                         </actions>
2133                 </permacrud>
2134         </class>
2135
2136         <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">
2137                 <fields oils_persist:primary="code">
2138                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2139                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2140                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2141                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2142                 </fields>
2143                 <links>
2144                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2145                 </links>
2146                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2147                         <actions>
2148                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2149                                 <retrieve/>
2150                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2151                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2152                         </actions>
2153                 </permacrud>
2154         </class>
2155
2156         <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">
2157                 <fields oils_persist:primary="code">
2158                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2159                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2160                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2161                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2162                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2163                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2164                 </fields>
2165                 <links>
2166                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2167                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2168                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2169                 </links>
2170                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2171                         <actions>
2172                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2173                                 <retrieve/>
2174                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2175                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2176                         </actions>
2177                 </permacrud>
2178         </class>
2179
2180     <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">
2181         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2182             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2183             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2184             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2185         </fields>
2186         <links>
2187             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2188             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2189         </links>
2190         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2191             <actions>
2192                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2193                 <retrieve/>
2194                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2195                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2196             </actions>
2197         </permacrud>
2198     </class>
2199
2200         <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">
2201                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2202                         <field name="active" reporter:datatype="bool"/>
2203                         <field name="create_date" reporter:datatype="timestamp"/>
2204                         <field name="creator" />
2205                         <field name="deleted" reporter:datatype="bool"/>
2206                         <field name="edit_date" reporter:datatype="timestamp"/>
2207                         <field name="editor" />
2208                         <field name="id" reporter:datatype="id" />
2209                         <field name="last_xact_id" />
2210                         <field name="marc" />
2211                         <field name="source" />
2212                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2213                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2214                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2215                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2216                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2217                 </fields>
2218                 <links>
2219                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2220                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2221                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2222                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2223                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2224                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2225                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2226                 </links>
2227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2228                         <actions>
2229                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2230                                 <retrieve/>
2231                                 <update permission="UPDATE_MARC" global_required="true"/>
2232                                 <delete permission="UPDATE_MARC" global_required="true"/>
2233                         </actions>
2234                 </permacrud>
2235         </class>
2236         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2237                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2238                         <field name="char_encoding" />
2239                         <field name="id" />
2240                         <field name="record" />
2241                         <field name="record_status" />
2242                         <field name="thesaurus" />
2243                 </fields>
2244                 <links>
2245                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2246                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2247                 </links>
2248         </class>
2249         <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">
2250                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2251                         <field name="id" reporter:datatype="id" />
2252                         <field name="bib" reporter:datatype="link" />
2253                         <field name="authority" reporter:datatype="link" />
2254                 </fields>
2255                 <links>
2256                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2257                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2258                 </links>
2259         </class>
2260         <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">
2261                 <fields oils_persist:primary="code" oils_persist:sequence="">
2262                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2263                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2264                 </fields>
2265                 <links/>
2266         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2267             <actions>
2268                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2269                 <retrieve/>
2270                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2271                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2272             </actions>
2273         </permacrud>
2274         </class>
2275         <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">
2276                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2277                         <field name="accepting_usr" />
2278                         <field name="amount" reporter:datatype="money" />
2279                         <field name="amount_collected" reporter:datatype="money" />
2280                         <field name="approval_code" reporter:datatype="text"/>
2281                         <field name="cash_drawer" reporter:datatype="link"/>
2282                         <field name="cc_first_name" reporter:datatype="text"/>
2283                         <field name="cc_last_name" reporter:datatype="text"/>
2284                         <field name="cc_number" reporter:datatype="text"/>
2285                         <field name="cc_order_number" reporter:datatype="text"/>
2286                         <field name="cc_type" reporter:datatype="text"/>
2287                         <field name="cc_processor" reporter:datatype="text"/>
2288                         <field name="expire_month" reporter:datatype="int" />
2289                         <field name="expire_year" reporter:datatype="int" />
2290                         <field name="id" reporter:datatype="id" />
2291                         <field name="note" reporter:datatype="text"/>
2292                         <field name="payment_ts" reporter:datatype="timestamp"/>
2293                         <field name="xact" reporter:datatype="link"/>
2294                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2295                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2296                 </fields>
2297                 <links>
2298                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2299                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2300                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2301                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2302                 </links>
2303         </class>
2304         <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">
2305                 <fields oils_persist:primary="name">
2306                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2307                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2308                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2309                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2310                 </fields>
2311                 <links/>
2312         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2313             <actions>
2314                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2315                 <retrieve/>
2316                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2317                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2318             </actions>
2319         </permacrud>
2320         </class>
2321
2322         <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">
2323                 <fields oils_persist:primary="alias">
2324                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2325                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2326                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2327                 </fields>
2328                 <links>
2329                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2330                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2331                 </links>
2332         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2333             <actions>
2334                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2335                 <retrieve/>
2336                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2337                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2338             </actions>
2339         </permacrud>
2340         </class>
2341
2342         <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">
2343                 <fields oils_persist:primary="name">
2344                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2345                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2346                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2347                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2348                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2349                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2350                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2351                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2352                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2353                 </fields>
2354                 <links>
2355                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2356                 </links>
2357         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2358             <actions>
2359                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2360                 <retrieve/>
2361                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2362                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2363             </actions>
2364         </permacrud>
2365         </class>
2366
2367         <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">
2368                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2369                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2370                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2371                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2372                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2373                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2374                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2375                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2376                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2377                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2378                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2379                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2380                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2381                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2382                 </fields>
2383                 <links>
2384                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2385                 </links>
2386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2387             <actions>
2388                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2389                 <retrieve/>
2390                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2391                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2392             </actions>
2393         </permacrud>
2394         </class>
2395         <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">
2396                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2397                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2398                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2399                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2400                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2401                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2402                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2403                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2404                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2405                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2406                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2407                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2408                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2409                 </fields>
2410                 <links>
2411                 </links>
2412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2413                         <actions>
2414                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2415                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2416                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2417                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2418                         </actions>
2419                 </permacrud>
2420         </class>
2421         <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">
2422                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2423                         <field name="id" reporter:datatype="id" />
2424                         <field name="name" reporter:datatype="text"/>
2425                         <field name="xpath" reporter:datatype="text"/>
2426                         <field name="format" reporter:datatype="link"/>
2427                         <field name="first_word" reporter:datatype="bool" />
2428                 </fields>
2429                 <links/>
2430         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2431             <actions>
2432                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2433                 <retrieve/>
2434                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2435                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2436             </actions>
2437         </permacrud>
2438         </class>
2439         <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">
2440                 <fields oils_persist:primary="code" oils_persist:sequence="">
2441                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2442                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2443                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2444                 </fields>
2445                 <links/>
2446         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2447             <actions>
2448                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2449                 <retrieve/>
2450                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2451                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2452             </actions>
2453         </permacrud>
2454         </class>
2455         <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">
2456                 <fields oils_persist:primary="code" oils_persist:sequence="">
2457                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2458                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2459                 </fields>
2460                 <links/>
2461         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2462             <actions>
2463                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2464                 <retrieve/>
2465                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2466                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2467             </actions>
2468         </permacrud>
2469         </class>
2470     <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">
2471         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2472             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2473             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2474             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2475             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2476         </fields>
2477         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2478             <actions>
2479                 <retrieve/>
2480             </actions>
2481         </permacrud>
2482     </class>
2483         <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">
2484                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2485                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2486                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2487                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2488                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2489                 </fields>
2490                 <links>
2491                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2492                 </links>
2493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2494             <actions>
2495                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2496                 <retrieve/>
2497                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2498                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2499             </actions>
2500         </permacrud>
2501         </class>
2502         <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">
2503                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2504                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2505                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2506                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2507                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2508                 </fields>
2509                 <links>
2510                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2511                 </links>
2512         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2513             <actions>
2514                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2515                 <retrieve/>
2516                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2517                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2518             </actions>
2519         </permacrud>
2520         </class>
2521         <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">
2522                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2523                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2524                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2525                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2526                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2527                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2528                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2529                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2530                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2531                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2532                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2533                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2534                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2535                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2536                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2537                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2538                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2539                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2540                 </fields>
2541                 <links>
2542                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2543                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2544                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2545                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2546                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2547                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2548                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2549                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2550                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2551                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2552                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2553                 </links>
2554         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2555             <actions>
2556                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2557                 <retrieve/>
2558                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2559                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2560             </actions>
2561         </permacrud>
2562         </class>
2563         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2564                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2565                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2566                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2567                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2568                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2569                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2570                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2571                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2572                 </fields>
2573                 <links>
2574                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2575                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2576         </links>
2577         </class>
2578         <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">
2579                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2580                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2581                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2582                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2583                 </fields>
2584                 <links>
2585                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2586                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2587                 </links>
2588         </class>
2589         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2590                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2591                         <field name="id" reporter:datatype="id" />
2592                         <field name="value" oils_persist:i18n="true" />
2593                 </fields>
2594                 <links/>
2595         </class>
2596         <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">
2597                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2598                         <field name="balance_owed" reporter:datatype="money" />
2599                         <field name="total_owed" reporter:datatype="money" />
2600                         <field name="total_paid" reporter:datatype="money" />
2601                         <field name="usr" reporter:datatype="link"/>
2602                 </fields>
2603                 <links>
2604                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2605         </links>
2606         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2607             <actions>
2608                 <retrieve permission="VIEW_USER">
2609                     <context link="usr" field="home_ou"/>
2610                 </retrieve>
2611             </actions>
2612         </permacrud>
2613         </class>
2614         <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">
2615                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2616                         <field name="collector" />
2617                         <field name="enter_time" reporter:datatype="timestamp"/>
2618                         <field name="id" reporter:datatype="id" />
2619                         <field name="location" reporter:datatype="link"/>
2620                         <field name="usr" reporter:datatype="link"/>
2621                 </fields>
2622                 <links>
2623                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2624                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2625                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2626                 </links>
2627         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2628             <actions>
2629                 <create permission="money.collections_tracker.create" context_field="location"/>
2630                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2631                 <delete permission="money.collections_tracker.create" context_field="location"/>
2632             </actions>
2633         </permacrud>
2634         </class>
2635         <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">
2636                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2637                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2638                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2639                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2640                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2641                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2642                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2643                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2644                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2645                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2646                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2647                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2648                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2649                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2650                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2651                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2652                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2653                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2654                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2655                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2656                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2657                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2658                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2659                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2660                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2661                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2662                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2663                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2664                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2665                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2666                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2667                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2668                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2669                 </fields>
2670                 <links>
2671                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2672                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2673                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2674                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2675                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2676                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2677                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2678                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2679                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2680                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2681                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2682                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2683                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2684                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2685                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2686                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2687                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2688                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2689                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2690                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2691                 </links>
2692         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2693             <actions>
2694                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2695                 <retrieve/>
2696                 <update permission="UPDATE_MARC" global_required="true"/>
2697             </actions>
2698         </permacrud>
2699         </class>
2700         <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">
2701                 <fields oils_persist:primary="id">
2702                         <field name="dow_0_close" />
2703                         <field name="dow_0_open" />
2704                         <field name="dow_1_close" />
2705                         <field name="dow_1_open" />
2706                         <field name="dow_2_close" />
2707                         <field name="dow_2_open" />
2708                         <field name="dow_3_close" />
2709                         <field name="dow_3_open" />
2710                         <field name="dow_4_close" />
2711                         <field name="dow_4_open" />
2712                         <field name="dow_5_close" />
2713                         <field name="dow_5_open" />
2714                         <field name="dow_6_close" />
2715                         <field name="dow_6_open" />
2716                         <field name="id" reporter:datatype="id" />
2717                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2718                 </fields>
2719                 <links>
2720                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2721                 </links>
2722         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2723             <actions>
2724                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2725                 <retrieve/>
2726                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2727                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2728             </actions>
2729         </permacrud>
2730         </class>
2731         <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">
2732                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2733                         <field name="id" reporter:datatype="id" />
2734                         <field name="record" reporter:datatype="link"/>
2735                         <field name="label" reporter:datatype="text"/>
2736                         <field name="label_sortkey" reporter:datatype="text"/>
2737                 </fields>
2738                 <links>
2739                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2740                 </links>
2741         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2742             <actions>
2743                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2744                 <retrieve/>
2745                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2746                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2747             </actions>
2748         </permacrud>
2749         </class>
2750         <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">
2751                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2752                         <field name="id" reporter:datatype="id" />
2753                         <field name="target_copy" reporter:datatype="link" />
2754                         <field name="part" reporter:datatype="link"/>
2755                 </fields>
2756                 <links>
2757                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2758                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2759                 </links>
2760         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2761             <actions>
2762                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2763                 <retrieve/>
2764                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2765                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2766             </actions>
2767         </permacrud>
2768         </class>
2769         <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">
2770                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2771                         <field name="close_end" reporter:datatype="timestamp" />
2772                         <field name="close_start" reporter:datatype="timestamp" />
2773                         <field name="id" reporter:datatype="id" />
2774                         <field name="org_unit" reporter:datatype="org_unit"/>
2775                         <field name="reason" reporter:datatype="text"/>
2776                 </fields>
2777                 <links>
2778                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2779                 </links>
2780         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2781             <actions>
2782                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2783                 <retrieve/>
2784                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2785                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2786             </actions>
2787         </permacrud>
2788         </class>
2789         <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">
2790                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2791                         <field name="extended" reporter:datatype="interval"/>
2792                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2793                         <field name="max_renewals" reporter:datatype="int" />
2794                         <field name="name" reporter:datatype="text"/>
2795                         <field name="normal" reporter:datatype="interval"/>
2796                         <field name="shrt" reporter:datatype="interval"/>
2797                 </fields>
2798                 <links>
2799                 </links>
2800         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2801             <actions>
2802                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2803                 <retrieve/>
2804                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2805                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2806             </actions>
2807         </permacrud>
2808         </class>
2809
2810         <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">
2811                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2812                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2813                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2814             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2815                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2816             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2817                 </fields>
2818                 <links>
2819             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2820                 </links>
2821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2822             <actions>
2823                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2824                 <retrieve/>
2825                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2826                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2827             </actions>
2828                 </permacrud>
2829         </class>
2830
2831         <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">
2832                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2833                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2834                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2835                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2836             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2837                 </fields>
2838                 <links>
2839                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2840                 </links>
2841                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2842             <actions>
2843                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2844                 <retrieve/>
2845                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2846                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2847             </actions>
2848                 </permacrud>
2849         </class>
2850
2851         <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">
2852                 <fields oils_persist:primary="id" oils_persist:sequence="">
2853                         <field name="balance_owed" reporter:datatype="money"/>
2854                         <field name="id" reporter:datatype="id" />
2855                         <field name="last_billing_note" reporter:datatype="text"/>
2856                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2857                         <field name="last_billing_type" reporter:datatype="text"/>
2858                         <field name="last_payment_note" reporter:datatype="text"/>
2859                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2860                         <field name="last_payment_type" reporter:datatype="text"/>
2861                         <field name="total_owed" reporter:datatype="money"/>
2862                         <field name="total_paid" reporter:datatype="money"/>
2863                         <field name="usr" reporter:datatype="link"/>
2864                         <field name="xact_finish" reporter:datatype="timestamp" />
2865                         <field name="xact_start" reporter:datatype="timestamp" />
2866                         <field name="xact_type" reporter:datatype="text"/>
2867                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2868                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2869                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2870                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2871                         <field name="billing_location" reporter:datatype="link"/>
2872                 </fields>
2873                 <links>
2874                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2875                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2876                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2877                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2878                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2879                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2880                 </links>
2881         </class>
2882         <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">
2883                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2884                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2885                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2886                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2887                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2888                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2889                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2890                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2891                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2892                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2893                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2894                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2895                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2896                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2897                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2898                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2899                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2900                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2901                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2902                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2903                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2904                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2905                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2906                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2907                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2908                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2909                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2910                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2911                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2912                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2913                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2914                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2915                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2916                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2917                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2918                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2919                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2920                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2921                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2922                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2923                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2924                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2925                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2926                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2927                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2928                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2929                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2930                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2931                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2932                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2933                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2934                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2935                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2936                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2937                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2938                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2939                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2940                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2941                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2942                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2943                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2944                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2945                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2946                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2947                 </fields>
2948                 <links>
2949                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2950                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2951                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2952                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2953                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2954                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2955                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2956                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2957                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2958                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2959                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2960                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2961                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2962                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2963                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2964                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2965                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2966                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2967                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2968                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2969                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2970                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2971                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2972                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2973                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2974                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2975                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2976                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2977                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2978                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2979                 </links>
2980                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2981                         <actions>
2982                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
2983                         </actions>
2984                 </permacrud>
2985         </class>
2986         <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">
2987                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2988                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2989                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2990                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2991                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2992                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2993                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2994                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2995                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2996         </fields>
2997                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2998                         <actions>
2999                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3000                                 <retrieve/>
3001                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3002                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3003                         </actions>
3004                 </permacrud>
3005         </class>
3006         <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">
3007                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3008                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3009                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3010                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3011                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3012         </fields>
3013         <links>
3014                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3015                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3016                 </links>
3017                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3018                         <actions>
3019                                 <retrieve permission="RUN_REPORTS">
3020                                         <context link="usr" field="home_ou" />
3021                                 </retrieve>
3022                         </actions>
3023                 </permacrud>
3024         </class>
3025         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3026                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3027                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3028                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3029                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3030                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3031                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3032                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3033         </fields>
3034         <links>
3035                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3036                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3037                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3038                 </links>
3039                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3040                         <actions>
3041                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3042                                         <context link="usr" field="home_ou" />
3043                                         <context link="ws" field="owning_lib" />
3044                                 </retrieve>
3045                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3046                                         <context link="usr" field="home_ou" />
3047                                         <context link="ws" field="owning_lib" />
3048                                 </create>
3049                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3050                                         <context link="usr" field="home_ou" />
3051                                         <context link="ws" field="owning_lib" />
3052                                 </update>
3053                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3054                                         <context link="usr" field="home_ou" />
3055                                         <context link="ws" field="owning_lib" />
3056                                 </delete>
3057                         </actions>
3058                 </permacrud>
3059         </class>
3060         <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">
3061                 <fields oils_persist:primary="name">
3062                         <field name="name" reporter:datatype="text"/>
3063                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3064                 </fields>
3065                 <links/>
3066                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3067                         <actions>
3068                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3069                                 <retrieve/>
3070                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3071                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3072                         </actions>
3073                 </permacrud>
3074         </class>
3075         <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">
3076                 <fields oils_persist:primary="name">
3077                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3078                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3079                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3080                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3081                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3082                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3083                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3084                 </fields>
3085                 <links>
3086                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3087                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3088                 </links>
3089                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3090                         <actions>
3091                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3092                                 <retrieve/>
3093                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3094                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3095                         </actions>
3096                 </permacrud>
3097         </class>
3098         <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">
3099                 <fields oils_persist:primary="name">
3100                         <field name="name" reporter:datatype="text"/>
3101                         <field name="label" reporter:datatype="text"/>
3102                         <field name="description" reporter:datatype="text"/>
3103                         <field name="datatype" reporter:datatype="text"/>
3104                         <field name="view_perm" reporter:datatype="link"/>
3105                         <field name="update_perm" reporter:datatype="link"/>
3106                         <field name="fm_class" reporter:datatype="text"/>
3107                         <field name="grp" reporter:datatype="link"/>
3108                 </fields>
3109                 <links>
3110                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3111                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3112                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3113                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3114                 </links>
3115                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3116                         <actions>
3117                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3118                                 <retrieve/>
3119                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3120                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3121                         </actions>
3122                 </permacrud>
3123         </class>
3124         <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">
3125                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3126                         <field name="id" />
3127                         <field name="name"  reporter:datatype="text"/>
3128                         <field name="org_unit" reporter:datatype="org_unit"/>
3129                         <field name="value"  reporter:datatype="text"/>
3130                 </fields>
3131                 <links>
3132                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3133                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3134                 </links>
3135         </class>
3136         <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">
3137                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3138                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3139                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3140                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3141                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3142                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3143                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3144                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3145                 </fields>
3146                 <links>
3147                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3148                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3149                 </links>
3150         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3151             <actions>
3152                 <create permission="CREATE_COPY_NOTE">
3153                     <context link="owning_copy" field="circ_lib"/>
3154                 </create>
3155                 <retrieve permission="VIEW_COPY_NOTES">
3156                     <context link="owning_copy" field="circ_lib"/>
3157                 </retrieve>
3158                 <update permission="UPDATE_COPY_NOTE">
3159                     <context link="owning_copy" field="circ_lib"/>
3160                 </update>
3161                 <delete permission="DELETE_COPY_NOTE">
3162                     <context link="owning_copy" field="circ_lib"/>
3163                 </delete>
3164             </actions>
3165         </permacrud>
3166         </class>
3167         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3168                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3169                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3170                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3171                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3172                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3173                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3174                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3175                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3176                 </fields>
3177                 <links>
3178                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3179                 </links>
3180         </class>
3181         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3182                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3183                         <field name="fingerprint"  reporter:datatype="text"/>
3184                         <field name="id" reporter:datatype="id" />
3185                         <field name="master_record" reporter:datatype="link"/>
3186                         <field name="mods"  reporter:datatype="text"/>
3187                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3188                 </fields>
3189                 <links>
3190                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3191                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3192                 </links>
3193         </class>
3194         <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">
3195                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3196                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3197                         <field name="name"  reporter:datatype="text"/>
3198                 </fields>
3199                 <links/>
3200         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3201             <actions>
3202                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3203                 <retrieve/>
3204                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3205                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3206             </actions>
3207         </permacrud>
3208         </class>
3209         <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">
3210                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3211                         <field name="code"  reporter:datatype="text"/>
3212                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3213                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3214                 </fields>
3215                 <links/>
3216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3217             <actions>
3218                 <create permission="CREATE_PERM" global_required="true"/>
3219                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3220                 <update permission="UPDATE_PERM" global_required="true"/>
3221                 <delete permission="DELETE_PERM" global_required="true"/>
3222             </actions>
3223         </permacrud>
3224         </class>
3225         <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">
3226                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3227                         <field name="id" reporter:datatype="id" />
3228                         <field name="metarecord" reporter:datatype="link"/>
3229                         <field name="source" reporter:datatype="link"/>
3230                 </fields>
3231                 <links>
3232                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3233                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3234                 </links>
3235         </class>
3236         <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">
3237                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3238                         <field name="id" reporter:datatype="id" />
3239                         <field name="field" reporter:datatype="link"/>
3240                         <field name="source" reporter:datatype="link"/>
3241                         <field name="value"  reporter:datatype="text"/>
3242                 </fields>
3243                 <links>
3244                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3245                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3246                 </links>
3247         </class>
3248         <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">
3249                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3250                         <field name="id" reporter:datatype="id" />
3251                         <field name="value" reporter:datatype="text"/>
3252                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3253                 </fields>
3254                 <links>
3255                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3256                 </links>
3257         </class>
3258         <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">
3259                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3260                         <field name="id" reporter:datatype="id" />
3261                         <field name="entry" reporter:datatype="link"/>
3262                         <field name="def" reporter:datatype="link"/>
3263                         <field name="source" reporter:datatype="link"/>
3264                 </fields>
3265                 <links>
3266                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3267                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3268                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3269                 </links>
3270         </class>
3271         <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">
3272                 <oils_persist:source_definition>
3273                         SELECT * FROM metabib.author_field_entry
3274                                                 UNION ALL
3275                         SELECT * FROM metabib.keyword_field_entry
3276                                                 UNION ALL
3277                         SELECT * FROM metabib.identifier_field_entry
3278                                                 UNION ALL
3279                         SELECT * FROM metabib.title_field_entry
3280                                                 UNION ALL
3281                         SELECT * FROM metabib.subject_field_entry
3282                                                 UNION ALL
3283                         SELECT * FROM metabib.series_field_entry
3284                 </oils_persist:source_definition>
3285                 <fields>
3286                         <field name="field" reporter:datatype="link"/>
3287                         <field name="id" reporter:datatype="id" />
3288                         <field name="source" reporter:datatype="link"/>
3289                         <field name="value"  reporter:datatype="text"/>
3290                 </fields>
3291                 <links>
3292                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3293                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3294                 </links>
3295         </class>
3296         <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">
3297                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3298                         <field name="field" reporter:datatype="link"/>
3299                         <field name="id" reporter:datatype="id" />
3300                         <field name="source" reporter:datatype="link"/>
3301                         <field name="value"  reporter:datatype="text"/>
3302                 </fields>
3303                 <links>
3304                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3305                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3306                 </links>
3307         </class>
3308         <class id="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3309                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3310                         <field name="accepting_usr" reporter:datatype="link"/>
3311                         <field name="amount" reporter:datatype="money" />
3312                         <field name="amount_collected" reporter:datatype="money" />
3313                         <field name="cash_drawer" reporter:datatype="link"/>
3314                         <field name="id" reporter:datatype="id" />
3315                         <field name="note"  reporter:datatype="text"/>
3316                         <field name="payment_ts" reporter:datatype="timestamp"/>
3317                         <field name="xact" reporter:datatype="link"/>
3318                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3319                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3320                 </fields>
3321                 <links>
3322                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3323                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3324                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3325                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3326                 </links>
3327         </class>
3328         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3329                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3330                         <field name="accepting_usr" reporter:datatype="link"/>
3331                         <field name="amount" reporter:datatype="money" />
3332                         <field name="amount_collected" reporter:datatype="money" />
3333                         <field name="id" reporter:datatype="id" />
3334                         <field name="note"  reporter:datatype="text"/>
3335                         <field name="payment_ts" reporter:datatype="timestamp"/>
3336                         <field name="xact" reporter:datatype="link"/>
3337                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3338                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3339                 </fields>
3340                 <links>
3341                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3342                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3343                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3344                 </links>
3345         </class>
3346         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3347                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3348                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3349                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3350                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3351                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3352                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3353                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3354                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3355                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3356                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3357                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3358                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3359                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3360                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3361                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3362                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3363                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3364                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3365                 </fields>
3366                 <links>
3367                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3368                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3369                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3370                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3371                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3372                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3373                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3374                 </links>
3375         </class>
3376
3377         <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">
3378                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3379                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3380                         <field name="name"  reporter:datatype="text"/>
3381                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3382                         <field name="block_list" reporter:datatype="text"/>
3383                         <field name="staff_alert" reporter:datatype="bool"/>
3384                         <field name="org_depth" reporter:datatype="int"/>
3385                 </fields>
3386                 <links/>
3387         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3388             <actions>
3389                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3390                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3391                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3392                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3393             </actions>
3394         </permacrud>
3395         </class>
3396         <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">
3397                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3398                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3399                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3400                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3401                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3402                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3403                 </fields>
3404                 <links>
3405                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3406                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3407                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3408         </links>
3409         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3410             <actions>
3411                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3412                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3413                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3414                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3415             </actions>
3416         </permacrud>
3417         </class>
3418         <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">
3419                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3420                         <field name="holdable" reporter:datatype="bool"/>
3421                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3422                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3423                         <field name="opac_visible" reporter:datatype="bool"/>
3424             <field name="copy_active" reporter:datatype="bool"/>
3425             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3426                 </fields>
3427                 <links/>
3428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3429             <actions>
3430                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3431                 <retrieve/>
3432                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3433                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3434             </actions>
3435         </permacrud>
3436         </class>
3437         <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">
3438                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3439                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3440                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3441                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3442                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3443                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3444                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3445                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3446                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3447                 </fields>
3448                 <links>
3449                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3450                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3451                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3452                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3453                 </links>
3454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3455                         <actions>
3456                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3457                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3458                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3459                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3460                         </actions>
3461                 </permacrud>
3462         </class>
3463         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3464                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3465                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3466                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3467                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3468                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3469                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3470                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3471                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3472                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3473                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3474                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3475                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3476                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3477                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3478                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3479                 </fields>
3480                 <links>
3481                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3482                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3483                 </links>
3484         </class>
3485         <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">
3486                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3487                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3488                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3489                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3490                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3491                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3492                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3493                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3494                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3495                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3496                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3497                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3498                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3499                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3500                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3501                 </fields>
3502                 <links>
3503                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3504                 </links>
3505                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3506                         <actions>
3507                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3508                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3509                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3510                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3511                         </actions>
3512                 </permacrud>
3513         </class>
3514
3515
3516         <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">
3517                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3518                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3519                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3520                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3521                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3522                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3523                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3524                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3525                 </fields>
3526                 <links>
3527                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3528                 </links>
3529         </class>
3530
3531         <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">
3532                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3533                         <field name="call_number" />
3534                         <field name="create_date" reporter:datatype="timestamp"/>
3535                         <field name="creator" reporter:datatype="link"/>
3536                         <field name="id" reporter:datatype="id" />
3537                         <field name="pub" reporter:datatype="bool"/>
3538                         <field name="title"  reporter:datatype="text"/>
3539                         <field name="value"  reporter:datatype="text"/>
3540                 </fields>
3541                 <links>
3542                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3543                 </links>
3544         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3545             <actions>
3546                 <create permission="CREATE_VOLUME_NOTE">
3547                     <context link="call_number" field="owning_lib"/>
3548                 </create>
3549                 <retrieve permission="VIEW_VOLUME_NOTES">
3550                     <context link="call_number" field="owning_lib"/>
3551                 </retrieve>
3552                 <update permission="UPDATE_VOLUME_NOTE">
3553                     <context link="call_number" field="owning_lib"/>
3554                 </update>
3555                 <delete permission="DELETE_VOLUME_NOTE">
3556                     <context link="call_number" field="owning_lib"/>
3557                 </delete>
3558             </actions>
3559         </permacrud>
3560         </class>
3561         <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">
3562                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3563                         <field name="create_date" reporter:datatype="timestamp"/>
3564                         <field name="creator" reporter:datatype="link"/>
3565                         <field name="edit_date" reporter:datatype="timestamp"/>
3566                         <field name="editor" reporter:datatype="link"/>
3567                         <field name="id" reporter:datatype="id" />
3568                         <field name="record" reporter:datatype="link"/>
3569                         <field name="value" reporter:datatype="text"/>
3570                 </fields>
3571                 <links>
3572                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3573                 </links>
3574         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3575             <actions>
3576                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3577                 <retrieve/>
3578                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3579                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3580             </actions>
3581         </permacrud>
3582         </class>
3583         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3584         <oils_persist:source_definition>
3585 SELECT  usr,
3586         SUM(
3587             CASE
3588                 WHEN (
3589                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3590                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3591                 ) THEN 1
3592                 ELSE 0
3593             END
3594         ) AS out,
3595
3596         SUM(
3597             CASE
3598                 WHEN (
3599                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3600                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3601                 ) THEN 1
3602                 ELSE 0
3603             END
3604         ) AS overdue,
3605
3606         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3607         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3608         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3609   FROM  action.circulation
3610   WHERE checkin_time IS NULL
3611   GROUP BY 1
3612         </oils_persist:source_definition>
3613         <fields oils_persist:primary="usr">
3614             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3615             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3616             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3617             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3618             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3619             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3620         </fields>
3621         <links>
3622             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3623         </links>
3624         </class>
3625         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3626         <oils_persist:source_definition>
3627 SELECT  usr,
3628         ARRAY_TO_STRING(ARRAY_ACCUM(
3629             CASE
3630                 WHEN (
3631                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3632                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3633                 ) THEN id
3634                 ELSE 0
3635             END
3636         ),',') AS out,
3637
3638         ARRAY_TO_STRING(ARRAY_ACCUM(
3639             CASE
3640                 WHEN (
3641                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3642                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3643                 ) THEN id
3644                 ELSE 0
3645             END
3646         ),',') AS overdue,
3647
3648         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3649         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3650         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3651   FROM  action.circulation
3652   WHERE checkin_time IS NULL
3653   GROUP BY 1
3654         </oils_persist:source_definition>
3655         <fields oils_persist:primary="usr">
3656             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3657             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3658             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3659             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3660             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3661             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3662         </fields>
3663         <links>
3664             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3665         </links>
3666         </class>
3667         <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">
3668                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3669                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3670                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3671                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3672                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3673                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3674                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3675                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3676                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3677                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3678                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3679                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3680                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3681                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3682                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3683                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3684                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3685                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3686                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3687                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3688                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3689                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3690                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3691                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3692                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3693                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3694                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3695                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3696                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3697                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3698                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3699                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3700                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3701                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3702                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3703                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3704                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3705                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3706                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3707                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3708                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3709                 </fields>
3710                 <links>
3711                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3712                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3713                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3714                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3715                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3716                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3717                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3718                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3719                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3720                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3721                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3722                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3723                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3724                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3725                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3726                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3727                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3728                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3729                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3730                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3731                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3732                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3733                 </links>
3734                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3735                         <actions>
3736                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3737                         </actions>
3738                 </permacrud>
3739         </class>
3740         <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">
3741                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3742                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3743                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3744                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3745                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3746                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3747                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3748                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3749                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3750                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3751                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3752                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3753                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3754                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3755                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3756                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3757                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3758                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3759                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3760                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3761                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3762                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3763                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3764                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3765                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3766                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3767                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3768                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3769                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3770                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3771                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3772                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3773                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3774                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3775                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3776                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3777                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3778                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3779                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3780                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3781                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3782                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3783                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3784                 </fields>
3785                 <links>
3786                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3787                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3788                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3789                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3790                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3791                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3792                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3793                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3794                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3795                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3796                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3797                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3798                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3799                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3800                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3801                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3802                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3803                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3804                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3805                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3806                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3807                 </links>
3808         </class>
3809         <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">
3810                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3811                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3812                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3813                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3814                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3815                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3816                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3817                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3818                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3819                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3820                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3821                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3822                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3823                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3824                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3825                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3826                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3827                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3828                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3829                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3830                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3831                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3832                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3833                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3834                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3835                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3836                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3837                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3838                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3839                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3840                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3841                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3842                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3843                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3844                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3845                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3846                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3847                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3848                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3849                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3850                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3851                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3852                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3853                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3854                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3855                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3856                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3857                 </fields>
3858                 <links>
3859                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3860                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3861                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3862                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3863                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3864                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3865                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3866                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3867                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3868                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3869                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3870                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3871                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3872                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3873                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3874                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3875                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3876                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3877                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3878                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3879                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3880                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3881                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3882                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3883                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3884                 </links>
3885         </class>
3886
3887         <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">
3888                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3889                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3890                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3891                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3892                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3893                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3894                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3895                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3896                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3897                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3898                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3899                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3900                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3901                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3902                 </fields>
3903                 <links>
3904                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3905                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3906                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3907                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3908                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3909                 </links>
3910                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3911                         <actions>
3912                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3913                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3914                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3915                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3916                         </actions>
3917                 </permacrud>
3918         </class>
3919
3920         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3921                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3922                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3923                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3924                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3925                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3926                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3927                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3928                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3929                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3930                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3931                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3932                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3933                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3934                 </fields>
3935                 <links>
3936                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3937                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3938                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3939                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3940                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3941                 </links>
3942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3943                         <actions>
3944                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3945                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3946                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3947                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3948                         </actions>
3949                 </permacrud>
3950         </class>
3951         
3952         <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">
3953                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3954                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3955                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3956                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3957                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3958                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3959                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3960                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3961                 </fields>
3962                 <links>
3963                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3964                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3965                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3966                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3967                 </links>
3968                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3969                         <actions>
3970                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3971                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3972                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3973                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3974                         </actions>
3975                 </permacrud>
3976         </class>
3977         
3978         <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">
3979                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3980                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3981                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3982                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3983                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3984                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3985                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3986                 </fields>
3987                 <links>
3988                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3989                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3990                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3991                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3992                 </links>
3993                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3994                         <actions>
3995                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3996                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3997                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3998                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3999                         </actions>
4000                 </permacrud>
4001         </class>
4002         
4003         <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">
4004                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4005                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4006                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4007                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4008                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4009                 </fields>
4010                 <links>
4011                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4012                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4013                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4014                 </links>
4015                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4016                         <actions>
4017                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4018                     <context link="resource" field="owner" />
4019                 </create>
4020                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4021                     <context link="resource" field="owner" />
4022                 </retrieve>
4023                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4024                     <context link="resource" field="owner" />
4025                 </update>
4026                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4027                     <context link="resource" field="owner" />
4028                 </delete>
4029                         </actions>
4030                 </permacrud>
4031         </class>
4032         
4033         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4034                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4035                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4036                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4037                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4038                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4039                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4040                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4041                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4042                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4043                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4044                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4045                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4046                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4047                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4048                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4049                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4050                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4051                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4052                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4053                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4054                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4055                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4056                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4057                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4058                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4059                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4060                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4061                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4062                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4063                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4064                 </fields>
4065                 <links>
4066                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4067                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4068                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4069                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4070                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4071                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4072                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4073                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4074                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4075                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4076                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4077                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4078                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4079                 </links>
4080                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4081                         <actions>
4082                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4083                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4084                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4085                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4086                         </actions>
4087                 </permacrud>
4088         </class>
4089         
4090         <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">
4091                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4092                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4093                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4094                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4095                 </fields>
4096                 <links>
4097                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4098                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4099                 </links>
4100                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4101                         <actions>
4102                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4103                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4104                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4105                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4106                         </actions>
4107                 </permacrud>
4108         </class>
4109
4110         <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">
4111                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4112                         <field name="bucket" reporter:datatype="link"/>
4113                         <field name="id" reporter:datatype="id" />
4114                         <field name="target_call_number" reporter:datatype="link" />
4115                         <field name="create_time" reporter:datatype="timestamp" />
4116                         <field name="pos" reporter:datatype="int" />
4117                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4118                 </fields>
4119                 <links>
4120                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4121                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4122             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4123                 </links>
4124         </class>
4125         <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">
4126                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4127                         <field name="id" reporter:datatype="id" />
4128                         <field name="item" reporter:datatype="link"/>
4129                         <field name="note" reporter:datatype="text" />
4130                 </fields>
4131                 <links>
4132                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4133                 </links>
4134         </class>
4135         <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">
4136                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4137                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4138                         <field name="btype" reporter:datatype="text"/>
4139                         <field name="id" reporter:datatype="id" />
4140                         <field name="name" reporter:datatype="text"/>
4141                         <field name="description" reporter:datatype="text"/>
4142                         <field name="owner" reporter:datatype="link"/>
4143                         <field name="pub" reporter:datatype="bool"/>
4144                         <field name="create_time" reporter:datatype="timestamp" />
4145                 </fields>
4146                 <links>
4147                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4148                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4149                 </links>
4150         </class>
4151         <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">
4152                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4153                         <field name="id" reporter:datatype="id" />
4154                         <field name="bucket" reporter:datatype="link"/>
4155                         <field name="note" reporter:datatype="text" />
4156                 </fields>
4157                 <links>
4158                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4159                 </links>
4160         </class>
4161         <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">
4162                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4163                         <field name="hold" reporter:datatype="link"/>
4164                         <field name="id" reporter:datatype="id" />
4165                         <field name="target_copy" reporter:datatype="link"/>
4166                         <field name="proximity" reporter:datatype="number"/>
4167                 </fields>
4168                 <links>
4169                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4170                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4171                 </links>
4172         </class>
4173         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4174                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4175                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4176                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4177                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4178                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4179                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4180                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4181                 </fields>
4182                 <links>
4183                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4184                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4185                 </links>
4186         </class>
4187         <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">
4188                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4189                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4190                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4191                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4192                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4193                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4194                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4195                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4196                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4197                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4198                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4199                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4200                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4201                 </fields>
4202                 <links>
4203                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4204                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4205                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4206                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4207                 </links>
4208         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4209             <actions>
4210                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4211                 <retrieve/>
4212                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4213                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4214             </actions>
4215         </permacrud>
4216         </class>
4217         <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">
4218                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4219                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4220                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4221                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4222                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4223             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4224             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4225             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4226                 </fields>
4227                 <links>
4228                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4229                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4230                 </links>
4231         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4232             <actions>
4233                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4234                 <retrieve/>
4235                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4236                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4237             </actions>
4238         </permacrud>
4239         </class>
4240         <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">
4241                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4242                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4243             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4244             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4245                 </fields>
4246                 <links>
4247                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4248                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4249                 </links>
4250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4251             <actions>
4252                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4253                                         <context link="lgroup" field="owner" />
4254                 </create>
4255                 <retrieve/>
4256                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4257                                         <context link="lgroup" field="owner" />
4258                 </update>
4259                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4260                                         <context link="lgroup" field="owner" />
4261                 </delete>
4262             </actions>
4263         </permacrud>
4264         </class>
4265
4266     <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">
4267         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4268             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4269             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4270             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4271             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4272         </fields>
4273         <links>
4274             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4275             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4276         </links>
4277         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4278             <actions>
4279                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4280                 <retrieve/>
4281                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4282                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4283             </actions>
4284         </permacrud>
4285     </class>
4286
4287         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4288                 <fields>
4289                         <field name="sre_id" oils_persist:virtual="true" />
4290                         <field name="location" oils_persist:virtual="true" />
4291                         <field name="owning_lib" oils_persist:virtual="true" />
4292                         <field name="basic_holdings" oils_persist:virtual="true" />
4293                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4294                         <field name="supplement_holdings" oils_persist:virtual="true" />
4295                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4296                         <field name="index_holdings" oils_persist:virtual="true" />
4297                         <field name="index_holdings_add" oils_persist:virtual="true" />
4298                         <field name="online" oils_persist:virtual="true" />
4299                         <field name="missing" oils_persist:virtual="true" />
4300                         <field name="incomplete" oils_persist:virtual="true" />
4301                 </fields>
4302         </class>
4303
4304         <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">
4305                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4306                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4307                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4308                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4309                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4310                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4311                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4312                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4313                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4314                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4315                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4316                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4317                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4318                 </fields>
4319                 <links>
4320                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4321                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4322                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4323                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4324                 </links>
4325                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4326                         <actions>
4327                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4328                                 <retrieve/>
4329                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4330                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4331                         </actions>
4332                 </permacrud>
4333         </class>
4334
4335         <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">
4336                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4337                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4338                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4339                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4340                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4341                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4342                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4343                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4344                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4345                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4346                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4347                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4348                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4349                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4350                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4351                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4352                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4353                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4354                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4355                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4356                 </fields>
4357                 <links>
4358                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4359                 </links>
4360                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4361                         <actions>
4362                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4363                                         <context link="subscription" field="owning_lib" />
4364                                 </create>
4365                                 <retrieve />
4366                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4367                                         <context link="subscription" field="owning_lib" />
4368                                 </update>
4369                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4370                                         <context link="subscription" field="owning_lib" />
4371                                 </delete>
4372                         </actions>
4373                 </permacrud>
4374         </class>
4375
4376         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4377                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4378                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4379                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4380                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4381                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4382                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4383                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4384                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4385                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4386                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4387                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4388                 </fields>
4389                 <links>
4390                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4391                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4392                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4393                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4394                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4395                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4396                 </links>
4397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4398                         <actions>
4399                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4400                                 <retrieve />
4401                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4402                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4403                         </actions>
4404                 </permacrud>
4405         </class>
4406
4407         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4408                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4409                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4410                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4411                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4412                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4413                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4414                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4415                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4416                 </fields>
4417                 <links>
4418                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4419                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4420                 </links>
4421         </class>
4422
4423         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4424                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4425                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4426                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4427                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4428                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4429                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4430                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4431                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4432                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4433                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4434                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4435                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4436                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4437                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4438                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4439                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4440                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4441                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4442                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4443                 </fields>
4444                 <links>
4445                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4446                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4447                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4448                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4449                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4450                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4451                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4452                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4453                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4454                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4455                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4456                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4457                 </links>
4458                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4459                         <actions>
4460                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4461                                 <retrieve />
4462                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4463                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4464                         </actions>
4465                 </permacrud>
4466         </class>
4467
4468         <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">
4469                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4470                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4471                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4472                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4473                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4474                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4475                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4476                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4477                 </fields>
4478                 <links>
4479                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4480                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4481                 </links>
4482                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4483                         <actions>
4484                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4485                                         <context link="distribution" field="holding_lib" />
4486                                 </create>
4487                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4488                                         <context link="distribution" field="holding_lib" />
4489                                 </retrieve>
4490                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4491                                         <context link="distribution" field="holding_lib" />
4492                                 </update>
4493                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4494                                         <context link="distribution" field="holding_lib" />
4495                                 </delete>
4496                         </actions>
4497                 </permacrud>
4498         </class>
4499
4500         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4501                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4502                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4503                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4504                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4505                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4506                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4507                 </fields>
4508                 <links>
4509                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4510                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4511                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4512                 </links>
4513                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4514                         <actions>
4515                                 <create permission="ADMIN_SERIAL_STREAM">
4516                                         <context link="distribution" field="holding_lib" />
4517                                 </create>
4518                                 <retrieve />
4519                                 <update permission="ADMIN_SERIAL_STREAM">
4520                                         <context link="distribution" field="holding_lib" />
4521                                 </update>
4522                                 <delete permission="ADMIN_SERIAL_STREAM">
4523                                         <context link="distribution" field="holding_lib" />
4524                                 </delete>
4525                         </actions>
4526                 </permacrud>
4527         </class>
4528
4529         <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">
4530                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4531                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4532                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4533                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4534                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4535                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4536                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4537                 </fields>
4538                 <links>
4539                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4540                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4541                 </links>
4542                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4543                         <actions>
4544                                 <create permission="ADMIN_SERIAL_STREAM">
4545                                         <context link="stream" jump="distribution" field="holding_lib" />
4546                                 </create>
4547                                 <retrieve permission="RECEIVE_SERIAL">
4548                                         <context link="stream" jump="distribution" field="holding_lib" />
4549                                 </retrieve>
4550                                 <update permission="ADMIN_SERIAL_STREAM">
4551                                         <context link="stream" jump="distribution" field="holding_lib" />
4552                                 </update>
4553                                 <delete permission="ADMIN_SERIAL_STREAM">
4554                                         <context link="stream" jump="distribution" field="holding_lib" />
4555                                 </delete>
4556                         </actions>
4557                 </permacrud>
4558         </class>
4559
4560         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4561                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4562                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4563                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4564                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4565                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4566                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4567                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4568                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4569                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4570                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4571                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4572                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4573                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4574                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4575                 </fields>
4576                 <links>
4577                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4578                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4579                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4580                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4581                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4582                 </links>
4583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4584                         <actions>
4585                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4586                                         <context link="subscription" field="owning_lib" />
4587                                 </create>
4588                                 <retrieve/>
4589                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4590                                         <context link="subscription" field="owning_lib" />
4591                                 </update>
4592                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4593                                         <context link="subscription" field="owning_lib" />
4594                                 </delete>
4595                         </actions>
4596                 </permacrud>
4597         </class>
4598
4599         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4600                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4601                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4602                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4603                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4604                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4605                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4606                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4607                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4608                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4609                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4610                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4611                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4612                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4613                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4614                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4615                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4616                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4617                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4618                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4619                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4620                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4621                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4622                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4623                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4624                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4625                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4626                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4627                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4628                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4629                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4630                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4631                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4632                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4633                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4634                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4635                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4636                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4637                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4638                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4639                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4640                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4641                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4642                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4643                 </fields>
4644                 <links>
4645                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4646                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4647                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4648                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4649                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4650                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4651                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4652                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4653                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4654                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4655                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4656                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4657                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4658                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4659                 </links>
4660                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4661                         <actions>
4662                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4663                                 <retrieve/>
4664                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4665                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4666                         </actions>
4667                 </permacrud>
4668         </class>
4669
4670         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4671                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4672                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4673                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4674                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4675                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4676                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4677                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4678                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4679                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4680                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4681                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4682                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4683                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4684                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4685                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4686                 </fields>
4687                 <links>
4688                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4689                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4690                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4691                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4692                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4693                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4694                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4695                 </links>
4696                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4697                         <actions>
4698                                 <create permission="ADMIN_SERIAL_ITEM">
4699                                         <context link="stream" jump="distribution" field="holding_lib" />
4700                                 </create>
4701                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4702                                         <context link="stream" jump="distribution" field="holding_lib" />
4703                                 </retrieve>
4704                                 <update permission="ADMIN_SERIAL_ITEM">
4705                                         <context link="stream" jump="distribution" field="holding_lib" />
4706                                 </update>
4707                                 <delete permission="ADMIN_SERIAL_ITEM">
4708                                         <context link="stream" jump="distribution" field="holding_lib" />
4709                                 </delete>
4710                         </actions>
4711                 </permacrud>
4712         </class>
4713
4714         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4715                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4716                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4717                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4718                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4719                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4720                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4721                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4722                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4723                 </fields>
4724                 <links>
4725                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4726                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4727                 </links>
4728                 <!-- Not available via PCRUD at this time -->
4729         </class>
4730         <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">
4731                 <fields>
4732                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4733                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4734                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4735                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4736                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4737                 </fields>
4738                 <links>
4739                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4740                 </links>
4741         </class>
4742         <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">
4743                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4744                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4745                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4746                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4747                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4748                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4749                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4750                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4751                 </fields>
4752                 <links>
4753                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4754                 </links>
4755         </class>
4756         <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">
4757                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4758                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4759                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4760                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4761                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4762                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4763                 </fields>
4764                 <links>
4765                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4766                 </links>
4767                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4768                         <actions>
4769                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4770                                         <context link="distribution" field="holding_lib" />
4771                                 </create>
4772                                 <retrieve/>
4773                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4774                                         <context link="distribution" field="holding_lib" />
4775                                 </update>
4776                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4777                                         <context link="distribution" field="holding_lib" />
4778                                 </delete>
4779                         </actions>
4780                 </permacrud>
4781         </class>
4782
4783         <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">
4784                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4785                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4786                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4787                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4788                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4789                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4790                 </fields>
4791                 <links>
4792                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4793                 </links>
4794                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4795                         <actions>
4796                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4797                                         <context link="distribution" field="holding_lib" />
4798                                 </create>
4799                                 <retrieve/>
4800                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4801                                         <context link="distribution" field="holding_lib" />
4802                                 </update>
4803                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4804                                         <context link="distribution" field="holding_lib" />
4805                                 </delete>
4806                         </actions>
4807                 </permacrud>
4808         </class>
4809
4810         <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">
4811                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4812                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4813                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4814                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4815                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4816                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4817                 </fields>
4818                 <links>
4819                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4820                 </links>
4821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4822                         <actions>
4823                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4824                                         <context link="distribution" field="holding_lib" />
4825                                 </create>
4826                                 <retrieve/>
4827                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4828                                         <context link="distribution" field="holding_lib" />
4829                                 </update>
4830                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4831                                         <context link="distribution" field="holding_lib" />
4832                                 </delete>
4833                         </actions>
4834                 </permacrud>
4835         </class>
4836
4837         <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">
4838                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4839                         <field name="id" reporter:datatype="id" />
4840                         <field name="owning_copy" reporter:datatype="link"/>
4841                         <field name="stat_cat" reporter:datatype="link"/>
4842                         <field name="stat_cat_entry" reporter:datatype="link"/>
4843                 </fields>
4844                 <links>
4845                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4846                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4847                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4848                 </links>
4849         </class>
4850         <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">
4851                 <fields oils_persist:primary="code">
4852                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4853                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4854                 </fields>
4855                 <links/>
4856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4857             <actions>
4858                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4859                 <retrieve/>
4860                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4861                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4862             </actions>
4863         </permacrud>
4864         </class>
4865         <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">
4866                 <fields oils_persist:primary="code">
4867                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4868                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4869                 </fields>
4870                 <links/>
4871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4872             <actions>
4873                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4874                 <retrieve/>
4875                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4876                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4877             </actions>
4878         </permacrud>
4879         </class>
4880         <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">
4881                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4882                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4883                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4884                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4885                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4886                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4887                 </fields>
4888                 <links>
4889             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4890         </links>
4891         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4892             <actions>
4893                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4894                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4895                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4896                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4897             </actions>
4898         </permacrud>
4899         </class>
4900         <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">
4901                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4902                         <field name="id" reporter:datatype="id" />
4903                         <field name="name" reporter:datatype="text"/>
4904                 </fields>
4905                 <links/>
4906         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4907             <actions>
4908                 <create permission="CREATE_LASSO" global_required="true"/>
4909                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4910                 <update permission="UPDATE_LASSO" global_required="true"/>
4911                 <delete permission="DELETE_LASSO" global_required="true"/>
4912             </actions>
4913         </permacrud>
4914         </class>
4915         <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">
4916                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4917                         <field name="id" reporter:datatype="id" />
4918                         <field name="lasso" reporter:datatype="link"/>
4919                         <field name="org_unit" reporter:datatype="org_unit"/>
4920                 </fields>
4921                 <links>
4922                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4923                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4924                 </links>
4925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4926             <actions>
4927                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4928                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4929                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4930                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4931             </actions>
4932         </permacrud>
4933         </class>
4934         <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">
4935                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
4936                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4937                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
4938                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
4939                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
4940                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
4941                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
4942                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
4943                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
4944                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
4945                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
4946                 </fields>
4947                 <links>
4948                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4949                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4950                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
4951                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
4952                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
4953                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4954                 </links>
4955         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4956             <actions>
4957                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4958                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4959                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4960                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
4961             </actions>
4962         </permacrud>
4963         </class>
4964         <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">
4965                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4966                         <field name="id" reporter:datatype="id" />
4967                         <field name="from_org" reporter:datatype="org_unit"/>
4968                         <field name="to_org" reporter:datatype="org_unit"/>
4969                         <field name="prox" reporter:datatype="int" />
4970                 </fields>
4971                 <links>
4972                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4973                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4974                 </links>
4975         </class>
4976         <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">
4977                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4978                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4979                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4980                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4981                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4982                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4983                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4984                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4985                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4986                 </fields>
4987                 <links/>
4988         </class>
4989         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4990                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4991                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4992                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4993                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4994                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4995                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4996                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4997                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4998                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4999                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5000                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5001                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5002                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5003                 </fields>
5004                 <links>
5005                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5006                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5007                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5008                 </links>
5009         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5010             <actions>
5011                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5012                 <retrieve/>
5013                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5014                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5015             </actions>
5016         </permacrud>
5017         </class>
5018         <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">
5019                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5020                         <field name="address_type"  reporter:datatype="text"/>
5021                         <field name="city"  reporter:datatype="text"/>
5022                         <field name="country"  reporter:datatype="text"/>
5023                         <field name="county"  reporter:datatype="text"/>
5024                         <field name="id" reporter:datatype="id" />
5025                         <field name="org_unit" reporter:datatype="org_unit"/>
5026                         <field name="post_code"  reporter:datatype="text"/>
5027                         <field name="state"  reporter:datatype="text"/>
5028                         <field name="street1"  reporter:datatype="text"/>
5029                         <field name="street2"  reporter:datatype="text"/>
5030                         <field name="valid" reporter:datatype="bool"/>
5031                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5032                 </fields>
5033                 <links>
5034                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5035                 </links>
5036         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5037             <actions>
5038                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5039                 <retrieve/>
5040                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5041                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5042             </actions>
5043         </permacrud>
5044         </class>
5045         <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">
5046                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5047                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5048                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5049                         <field name="query_text" reporter:datatype="text"/>
5050                 </fields>
5051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5052             <actions>
5053                 <retrieve/>
5054             </actions>
5055         </permacrud>
5056         </class>
5057
5058         <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">
5059                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5060                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5061                         <field name="owner" reporter:datatype="org_unit"/>
5062                         <field name="code" reporter:datatype="text"/>
5063                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5064                         <field name="create_date" reporter:datatype="timestamp"/>
5065                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5066                 </fields>
5067                 <links>
5068                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5069                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5070                 </links>
5071         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5072             <actions>
5073                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5074                 <retrieve/>
5075                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5076                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5077             </actions>
5078         </permacrud>
5079         </class>
5080         <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">
5081                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5082                         <field name="id" reporter:datatype="id"/>
5083                         <field name="grp" reporter:datatype="link"/>
5084                         <field name="pos" reporter:datatype="int"/>
5085                         <field name="query" reporter:datatype="link"/>
5086                 </fields>
5087                 <links>
5088                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5089                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5090                 </links>
5091         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5092             <actions>
5093                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5094                     <context link="grp" field="owner"/>
5095                 </create>
5096                 <retrieve/>
5097                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5098                     <context link="grp" field="owner"/>
5099                 </update>
5100                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5101                     <context link="grp" field="owner"/>
5102                 </delete>
5103             </actions>
5104         </permacrud>
5105         </class>
5106
5107         <!-- A note: Please update alhr and ahopl when updating ahr -->
5108         <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">
5109                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5110                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5111                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5112                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5113                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5114                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5115                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5116                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5117                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5118                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5119                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5120                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5121                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5122                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5123                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5124                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5125                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5126                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5127                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5128                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5129                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5130                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5131                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5132                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5133                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5134                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5135                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5136                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5137                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5138                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5139                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5140                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5141                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5142                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5143                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5144                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5145                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5146                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5147                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5148                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5149                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5150                 </fields>
5151                 <links>
5152                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5153                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5154                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5155                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5156                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5157                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5158                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5159                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5160                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5161                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5162                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5163                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5164                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5165                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5166                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5167                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5168                 </links>
5169                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5170                         <actions>
5171                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5172                         </actions>
5173                 </permacrud>
5174         </class>
5175         <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">
5176                 <oils_persist:source_definition><![CDATA[
5177                 SELECT
5178                         ahr.*,
5179                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5180                                 copy_location_order_position,
5181                         CASE WHEN au.alias IS NOT NULL THEN
5182                                 au.alias
5183                         ELSE
5184                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5185                                         COALESCE(au.family_name, ''),
5186                                         COALESCE(au.suffix, ''),
5187                                         ', ',
5188                                         COALESCE(au.prefix, ''),
5189                                         COALESCE(au.first_given_name, ''),
5190                                         COALESCE(au.second_given_name, '')
5191                                 ], ' '), E'\\s+,', ',')
5192                         END AS usr_display_name,
5193                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5194                                 AS call_number_label,
5195                         siss.label AS issuance_label,
5196                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5197                         ahcm_1.copy_count AS potential_copies
5198                 FROM action.hold_request ahr
5199                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5200                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5201                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5202                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5203                 JOIN actor.usr au ON (au.id = ahr.usr)
5204                 JOIN (
5205                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5206                         FROM asset.copy_location
5207                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5208                 LEFT JOIN actor.usr_standing_penalty ausp 
5209                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5210                 LEFT JOIN config.standing_penalty csp
5211                         ON (
5212                                 csp.id = ausp.standing_penalty AND 
5213                                 csp.block_list LIKE '%CAPTURE%' AND (
5214                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5215                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5216                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5217                                         )
5218                                 )
5219                         )
5220                 JOIN (
5221                         SELECT COUNT(target_copy) AS copy_count, hold
5222                         FROM action.hold_copy_map
5223                         GROUP BY 2
5224                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5225                 LEFT JOIN serial.issuance siss
5226                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5227                 LEFT JOIN asset.copy_location_order acplo
5228                         ON (acp.location = acplo.location AND
5229                                 acp.circ_lib = acplo.org)
5230                 WHERE
5231                         ahr.capture_time IS NULL AND
5232                         ahr.cancel_time IS NULL AND
5233                         csp.id IS NULL AND
5234                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5235                 ]]></oils_persist:source_definition>
5236                 <fields oils_persist:primary="id">
5237                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5238                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5239                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5240                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5241                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5242                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5243                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5244                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5245                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5246                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5247                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5248                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5249                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5250                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5251                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5252                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5253                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5254                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5255                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5256                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5257                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5258                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5259                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5260                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5261                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5262                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5263                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5264                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5265                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5266                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5267                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5268                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5269                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5270                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5271                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5272                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5273                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5274                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5275                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5276                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5277                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5278                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5279                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5280                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5281                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5282                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5283                 </fields>
5284                 <links>
5285                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5286                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5287                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5288                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5289                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5290                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5291                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5292                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5293                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5294                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5295                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5296                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5297                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5298                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5299                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5300                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5301                 </links>
5302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5303                         <actions>
5304                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5305                         </actions>
5306                 </permacrud>
5307         </class>
5308         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5309                 <oils_persist:source_definition>
5310                         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)
5311                 </oils_persist:source_definition>
5312                 <fields oils_persist:primary="id">
5313                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5314                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5315                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5316                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5317                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5318                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5319                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5320                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5321                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5322                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5323                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5324                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5325                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5326                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5327                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5328                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5329                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5330                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5331                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5332                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5333                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5334                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5335                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5336                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5337                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5338                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5339                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5340                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5341                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5342                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5343                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5344                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5345                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5346                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5347                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5348                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5349                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5350                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5351                 </fields>
5352                 <links>
5353                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5354                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5355                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5356                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5357                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5358                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5359                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5360                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5361                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5362                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5363                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5364                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5365                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5366                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5367                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5368                 </links>
5369         </class>
5370
5371         <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">
5372                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5373                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5374                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5375                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5376                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5377                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5378                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5379                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5380                 </fields>
5381                 <links>
5382                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5383                 </links>
5384                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5385                         <actions>
5386                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5387                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5388                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5389                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5390                         </actions>
5391                 </permacrud>
5392         </class>
5393         <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">
5394                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5395                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5396                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5397                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5398                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5399                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5400                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5401                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5402                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5403                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5404                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5405                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5406                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5407                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5408                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5409                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5410                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5411                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5412                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5413                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5414                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5415                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5416                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5417                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5418                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5419                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5420                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5421                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5422                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5423                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5424                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5425                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5426                 </fields>
5427                 <links>
5428                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5429                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5430                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5431                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5432                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5433                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5434                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5435                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5436                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5437                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5438                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5439                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5440                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5441                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5442                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5443                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5444                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5445                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5446                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5447                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5448                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5449                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5450                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5451                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5452                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5453                 </links>
5454         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5455             <actions>
5456                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5457                 <retrieve />
5458                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5459                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5460             </actions>
5461         </permacrud>
5462         </class>
5463         <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">
5464                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5465                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5466                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5467                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5468                 </fields>
5469                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5470                         <actions>
5471                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5472                                 <retrieve/>
5473                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5474                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5475                         </actions>
5476                 </permacrud>
5477         </class>
5478         <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">
5479                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5480                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5481                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5482                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5483                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5484                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5485                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5486                 </fields>
5487                 <links>
5488                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5489                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5490                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5491                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5492                 </links>
5493                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5494                         <actions>
5495                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5496                                 <retrieve/>
5497                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5498                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5499                         </actions>
5500                 </permacrud>
5501         </class>
5502         <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">
5503                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5504                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5505                         <field name="btype" reporter:datatype="text"/>
5506                         <field name="id" reporter:datatype="id" />
5507                         <field name="name"  reporter:datatype="text"/>
5508                         <field name="description" reporter:datatype="text"/>
5509                         <field name="owner" reporter:datatype="link"/>
5510                         <field name="pub" reporter:datatype="bool"/>
5511                         <field name="create_time" reporter:datatype="timestamp" />
5512                 </fields>
5513                 <links>
5514                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5515                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5516                 </links>
5517         </class>
5518         <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">
5519                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5520                         <field name="id" reporter:datatype="id" />
5521                         <field name="bucket" reporter:datatype="link"/>
5522                         <field name="note" reporter:datatype="text" />
5523                 </fields>
5524                 <links>
5525                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5526                 </links>
5527         </class>
5528         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5529                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5530                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5531                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5532                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5533                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5534                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5535                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5536                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5537                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5538                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5539                 </fields>
5540                 <links>
5541                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5542                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5543                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5544                 </links>
5545         </class>
5546         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5547                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5548                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5549                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5550                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5551                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5552                 </fields>
5553                 <links>
5554                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5555                 </links>
5556                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5557                         <actions>
5558                                 <retrieve permission="VIEW_USER">
5559                                         <context link="usr" field="home_ou" />
5560                                 </retrieve>
5561                         </actions>
5562                 </permacrud>
5563         </class>
5564     <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">
5565         <fields oils_persist:primary="field">
5566             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5567             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5568             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5569         </fields>
5570         <links/>
5571         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5572             <actions>
5573                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5574                 <retrieve />
5575                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5576                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5577             </actions>
5578         </permacrud>
5579     </class>
5580         <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">
5581                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5582                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5583                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5584                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5585                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5586                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5587                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5588                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5589                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5590                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5591                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5592                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5593                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5594                 </fields>
5595                 <links>
5596                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5597                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5598                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5599                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5600                 </links>
5601         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5602             <actions>
5603                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5604                 <retrieve />
5605                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5606                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5607             </actions>
5608         </permacrud>
5609         </class>
5610         <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">
5611                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5612                         <field name="field" reporter:datatype="link"/>
5613                         <field name="id" reporter:datatype="id" />
5614                         <field name="source" reporter:datatype="link"/>
5615                         <field name="value"  reporter:datatype="text"/>
5616                 </fields>
5617                 <links>
5618                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5619                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5620                 </links>
5621         </class>
5622         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5623                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5624                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5625                         <field name="btype" reporter:datatype="text"/>
5626                         <field name="id" reporter:datatype="id" />
5627                         <field name="name"  reporter:datatype="text"/>
5628                         <field name="description" reporter:datatype="text"/>
5629                         <field name="owner" reporter:datatype="link"/>
5630                         <field name="pub" reporter:datatype="bool"/>
5631                         <field name="create_time" reporter:datatype="timestamp" />
5632                 </fields>
5633                 <links>
5634                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5635                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5636                 </links>
5637         </class>
5638         <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">
5639                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5640                         <field name="id" reporter:datatype="id" />
5641                         <field name="bucket" reporter:datatype="link"/>
5642                         <field name="note" reporter:datatype="text" />
5643                 </fields>
5644                 <links>
5645                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5646                 </links>
5647         </class>
5648         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5649                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5650                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5651                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5652                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5653                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5654                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5655                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5656                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5657                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5658                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5659                 </fields>
5660                 <links>
5661                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5662                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5663                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5664                 </links>
5665         </class>
5666         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5667                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5668                         <field name="id" reporter:datatype="id" />
5669                         <field name="ind1" />
5670                         <field name="ind2" />
5671                         <field name="record" />
5672                         <field name="subfield" />
5673                         <field name="tag" />
5674                         <field name="value" />
5675                 </fields>
5676                 <links>
5677                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5678                 </links>
5679         </class>
5680         <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">
5681                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5682                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5683                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5684                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5685                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5686                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5687                 </fields>
5688                 <links>
5689                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5690                 </links>
5691         </class>
5692         <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">
5693                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5694                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5695                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5696                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5697                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5698                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5699                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5700                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5701                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5702                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5703                 </fields>
5704                 <links>
5705                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5706                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5707                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5708                 </links>
5709         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5710             <actions>
5711                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5712                 <retrieve/>
5713                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5714                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5715             </actions>
5716         </permacrud>
5717         </class>
5718         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5719                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5720                         <field name="create_date" reporter:datatype="timestamp"/>
5721                         <field name="creator" reporter:datatype="link"/>
5722                         <field name="edit_date" reporter:datatype="timestamp"/>
5723                         <field name="editor" reporter:datatype="link"/>
5724                         <field name="id" reporter:datatype="id" />
5725                         <field name="pub" reporter:datatype="bool"/>
5726                         <field name="record" reporter:datatype="link"/>
5727                         <field name="value"  reporter:datatype="text"/>
5728                 </fields>
5729                 <links>
5730                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5731                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5732                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5733                 </links>
5734         </class>
5735         <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">
5736                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5737                         <field name="balance_owed" reporter:datatype="money" />
5738                         <field name="total_owed" reporter:datatype="money" />
5739                         <field name="total_paid" reporter:datatype="money" />
5740                         <field name="usr" reporter:datatype="link"/>
5741                 </fields>
5742                 <links>
5743                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5744                 </links>
5745         </class>
5746         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5747                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5748                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5749                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5750                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5751                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5752                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5753                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5754                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5755                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5756                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5757                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5758                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5759                 </fields>
5760                 <links>
5761                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5762                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5763                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5764                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5765                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5766                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5767                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5768                 </links>
5769         </class>
5770         <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">
5771                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5772                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5773                         <field name="quality" reporter:datatype="int" />
5774                         <field name="source" reporter:datatype="text"/>
5775                         <field name="transcendant" reporter:datatype="bool"/>
5776                         <field name="can_have_copies" reporter:datatype="bool"/>
5777                 </fields>
5778                 <links/>
5779         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5780             <actions>
5781                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5782                 <retrieve/>
5783                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5784                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5785             </actions>
5786         </permacrud>
5787         </class>
5788         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5789                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5790                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5791                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5792                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5793                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5794                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5795                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5796                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5797                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5798                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5799                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5800                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5801                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5802                 </fields>
5803                 <links>
5804                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5805                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5806                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5807                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5808                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5809                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5810                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5811                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5812                 </links>
5813         </class>
5814         <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">
5815                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5816                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5817                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5818                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5819                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5820                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5821                 </fields>
5822                 <links>
5823                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5824                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5825                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5826                 </links>
5827         </class>
5828         <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">
5829                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5830                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5831                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5832                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5833                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5834                 </fields>
5835                 <links>
5836                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5837                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5838                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5839                 </links>
5840         </class>
5841         <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">
5842                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5843                         <field name="bucket" reporter:datatype="link"/>
5844                         <field name="id" reporter:datatype="id" />
5845                         <field name="target_user" reporter:datatype="link"/>
5846                         <field name="create_time" reporter:datatype="timestamp" />
5847                         <field name="pos" reporter:datatype="int" />
5848                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5849                 </fields>
5850                 <links>
5851                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5852                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5853             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5854                 </links>
5855         </class>
5856         <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">
5857                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5858                         <field name="id" reporter:datatype="id" />
5859                         <field name="item" reporter:datatype="link"/>
5860                         <field name="note" reporter:datatype="text" />
5861                 </fields>
5862                 <links>
5863                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5864                 </links>
5865         </class>
5866         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5867                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5868                         <field name="balance_owed" reporter:datatype="money" />
5869                         <field name="total_owed" reporter:datatype="money" />
5870                         <field name="total_paid" reporter:datatype="money" />
5871                         <field name="usr" reporter:datatype="link"/>
5872                 </fields>
5873                 <links>
5874                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5875                 </links>
5876         </class>
5877         <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">
5878                 <fields oils_persist:primary="code" oils_persist:sequence="">
5879                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5880                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5881                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5882                 </fields>
5883                 <links/>
5884         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5885             <actions>
5886                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5887                 <retrieve/>
5888                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5889                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5890             </actions>
5891         </permacrud>
5892         </class>
5893         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5894                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5895                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5896                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5897                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5898                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5899                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5900                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5901                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5902                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5903                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5904                 </fields>
5905                 <links>
5906                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5907                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5908                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5909                 </links>
5910         </class>
5911         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5912                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5913                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5914                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5915                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5916                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5917                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5918                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5919                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5920                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5921                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5922                 </fields>
5923                 <links>
5924                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5925                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5926                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5927                 </links>
5928         </class>
5929         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5930                 <fields oils_persist:primary="id" oils_persist:sequence="">
5931                         <field name="checkin_lib" reporter:datatype="link"/>
5932                         <field name="checkin_staff" reporter:datatype="link"/>
5933                         <field name="checkin_time" reporter:datatype="timestamp"/>
5934                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5935                         <field name="circ_staff" reporter:datatype="link"/>
5936                         <field name="desk_renewal" reporter:datatype="bool"/>
5937                         <field name="due_date" reporter:datatype="timestamp"/>
5938                         <field name="duration" reporter:datatype="interval"/>
5939                         <field name="duration_rule" reporter:datatype="link"/>
5940                         <field name="fine_interval" reporter:datatype="interval"/>
5941                         <field name="id" reporter:datatype="id" />
5942                         <field name="max_fine" reporter:datatype="money" />
5943                         <field name="max_fine_rule" reporter:datatype="link"/>
5944                         <field name="opac_renewal" reporter:datatype="bool"/>
5945                         <field name="phone_renewal" reporter:datatype="bool"/>
5946                         <field name="recurring_fine" reporter:datatype="money" />
5947                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5948                         <field name="renewal_remaining" reporter:datatype="int" />
5949             <field name="grace_period" reporter:datatype="interval" />
5950                         <field name="stop_fines" reporter:datatype="text"/>
5951                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5952                         <field name="target_copy" reporter:datatype="link"/>
5953                         <field name="usr" reporter:datatype="link"/>
5954                         <field name="xact_finish" reporter:datatype="timestamp" />
5955                         <field name="xact_start" reporter:datatype="timestamp" />
5956                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5957                 </fields>
5958                 <links>
5959                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5960                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5961                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5962                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5963                 </links>
5964         </class>
5965         <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">
5966                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5967                         <field name="field" reporter:datatype="link"/>
5968                         <field name="id" reporter:datatype="id" />
5969                         <field name="source" reporter:datatype="link"/>
5970                         <field name="value" reporter:datatype="text"/>
5971                 </fields>
5972                 <links>
5973                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5974                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5975                 </links>
5976         </class>
5977         <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">
5978                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5979                         <field name="high" reporter:datatype="money" />
5980                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5981                         <field name="low" reporter:datatype="money" />
5982                         <field name="name" reporter:datatype="text"/>
5983                         <field name="normal" reporter:datatype="money" />
5984                         <field name="recurrence_interval" reporter:datatype="interval"/>
5985             <field name="grace_period" reporter:datatype="interval" />
5986                 </fields>
5987                 <links/>
5988         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5989             <actions>
5990                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5991                 <retrieve/>
5992                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5993                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5994             </actions>
5995         </permacrud>
5996         </class>
5997         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5998                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5999                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6000                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6001                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6002                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6003                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6004                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6005                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6006                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6007                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6008                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6009                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6010                 </fields>
6011                 <links>
6012                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6013                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6014                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6015                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6016                 </links>
6017         </class>
6018         <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">
6019                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6020                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6021                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6022                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6023                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6024                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6025                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6026                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6027                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6028                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6029                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6030                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6031                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6032                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6033                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6034                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6035                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6036                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6037                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6038                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6039                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6040                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6041                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6042                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6043                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6044                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6045                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6046                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6047                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6048                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6049                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6050                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6051                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
6052                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6053                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6054                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6055                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6056                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6057                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6058                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6059                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6060                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6061                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6062                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6063                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6064                 </fields>
6065                 <links>
6066                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6067                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6068                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6069                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6070                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6071                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6072                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6073                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6074                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6075                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6076                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6077                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6078                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6079                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6080                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6081                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6082                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6083                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6084                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6085                 </links>
6086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6087             <actions>
6088                 <create permission="CREATE_COPY">
6089                     <context link="call_number" field="owning_lib"/>
6090                 </create>
6091                 <retrieve/>
6092                 <update permission="UPDATE_COPY">
6093                     <context link="call_number" field="owning_lib"/>
6094                 </update>
6095                 <delete permission="DELETE_COPY">
6096                     <context link="call_number" field="owning_lib"/>
6097                 </delete>
6098             </actions>
6099         </permacrud>
6100         </class>
6101
6102         <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">
6103                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6104                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6105                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6106                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6107                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6108                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6109                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6110                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6111                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6112                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6113                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6114                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6115                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6116                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6117                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6118                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6119                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6120                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6121                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6122                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6123                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6124                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6125                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6126                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6127                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6128                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6129                 </fields>
6130                 <links>
6131                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6132                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6133                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6134                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6135                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6136                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6137                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6138                 </links>
6139                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6140                         <actions>
6141                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6142                                 <retrieve />
6143                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6144                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6145                         </actions>
6146                 </permacrud>
6147         </class>
6148
6149         <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">
6150                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6151                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6152                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6153                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6154                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6155                 </fields>
6156                 <links/>
6157         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6158             <actions>
6159                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6160                 <retrieve/>
6161                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6162                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6163             </actions>
6164         </permacrud>
6165         </class>
6166         <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">
6167                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6168                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6169                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6170                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6171                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6172                 </fields>
6173                 <links/>
6174         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6175             <actions>
6176                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6177                 <retrieve/>
6178                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6179                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6180             </actions>
6181         </permacrud>
6182         </class>
6183         <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">
6184                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6185                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6186                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6187                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6188                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6189                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6190                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6191                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6192                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6193                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6194                 </fields>
6195                 <links>
6196                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6197                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6198                 </links>
6199         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6200             <actions>
6201                 <create permission="CREATE_PERM" global_required="true"/>
6202                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6203                 <update permission="UPDATE_PERM" global_required="true"/>
6204                 <delete permission="DELETE_PERM" global_required="true"/>
6205             </actions>
6206         </permacrud>
6207         </class>
6208         <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">
6209                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6210                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6211                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6212                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6213                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6214                 </fields>
6215                 <links>
6216                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6217                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6218                 </links>
6219         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6220             <actions>
6221                 <create permission="ADMIN_SURVEY">
6222                     <context link="question" jump="survey" field="owner"/>
6223                 </create>
6224                 <retrieve/>
6225                 <update permission="ADMIN_SURVEY">
6226                     <context link="question" jump="survey" field="owner"/>
6227                 </update>
6228                 <delete permission="ADMIN_SURVEY">
6229                     <context link="question" jump="survey" field="owner"/>
6230                 </delete>
6231             </actions>
6232         </permacrud>
6233         </class>
6234         <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">
6235                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6236                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6237                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6238                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6239                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6240                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6241                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6242                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6243                 </fields>
6244                 <links>
6245                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6246                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6247                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6248                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6249                 </links>
6250         </class>
6251         <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">
6252                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6253                         <field name="balance_owed" reporter:datatype="money" />
6254                         <field name="total_owed" reporter:datatype="money" />
6255                         <field name="total_paid" reporter:datatype="money" />
6256                         <field name="usr" reporter:datatype="link"/>
6257                 </fields>
6258                 <links>
6259                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6260                 </links>
6261         </class>
6262         <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">
6263                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6264                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6265                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6266                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6267                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6268                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6269                 </fields>
6270                 <links>
6271                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6272                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6273                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6274                 </links>
6275         </class>
6276         <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">
6277                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6278                         <field name="field" reporter:datatype="link"/>
6279                         <field name="id" reporter:datatype="id" />
6280                         <field name="source" reporter:datatype="link"/>
6281                         <field name="value" reporter:datatype="text"/>
6282                 </fields>
6283                 <links>
6284                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6285                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6286                 </links>
6287         </class>
6288         <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">
6289                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6290                         <field name="field" reporter:datatype="link"/>
6291                         <field name="id" reporter:datatype="id" />
6292                         <field name="source" reporter:datatype="link"/>
6293                         <field name="value" reporter:datatype="text"/>
6294                 </fields>
6295                 <links>
6296                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6297                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6298                 </links>
6299         </class>
6300         <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">
6301                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6302                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6303                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6304                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6305                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6306                 </fields>
6307                 <links>
6308                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6309                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6310                 </links>
6311         </class>
6312         <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">
6313                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6314                         <field name="depth" reporter:datatype="int" />
6315                         <field name="grantable" reporter:datatype="bool"/>
6316                         <field name="grp" reporter:datatype="link"/>
6317                         <field name="id" reporter:datatype="id" />
6318                         <field name="perm" reporter:datatype="link"/>
6319                 </fields>
6320                 <links>
6321                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6322                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6323                 </links>
6324         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6325             <actions>
6326                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6327                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6328                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6329                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6330             </actions>
6331         </permacrud>
6332         </class>
6333         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6334                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6335                         <field name="items" oils_persist:virtual="true" />
6336                         <field name="btype" reporter:datatype="text"/>
6337                         <field name="id" reporter:datatype="id" />
6338                         <field name="name" reporter:datatype="text"/>
6339                         <field name="description" reporter:datatype="text"/>
6340                         <field name="owner" reporter:datatype="link"/>
6341                         <field name="pub" reporter:datatype="bool"/>
6342                         <field name="create_time" reporter:datatype="timestamp" />
6343                 </fields>
6344                 <links>
6345                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6346                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6347                 </links>
6348         </class>
6349         <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">
6350                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6351                         <field name="id" reporter:datatype="id" />
6352                         <field name="bucket" reporter:datatype="link"/>
6353                         <field name="note" reporter:datatype="text" />
6354                 </fields>
6355                 <links>
6356                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6357                 </links>
6358         </class>
6359         <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">
6360                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6361                         <field name="id" reporter:datatype="int" />
6362                         <field name="usr" reporter:datatype="link"/>
6363                         <field name="work_ou" reporter:datatype="link"/>
6364                 </fields>
6365                 <links>
6366                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6367                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6368                 </links>
6369         </class>
6370         <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">
6371                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6372                         <field name="depth" reporter:datatype="int"/>
6373                         <field name="grantable" reporter:datatype="bool"/>
6374                         <field name="id" reporter:datatype="id" />
6375                         <field name="perm" reporter:datatype="link"/>
6376                         <field name="usr" reporter:datatype="link"/>
6377                 </fields>
6378                 <links>
6379                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6380                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6381                 </links>
6382         </class>
6383         <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">
6384                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6385                         <field name="object_id" reporter:datatype="text"/>
6386                         <field name="grantable" reporter:datatype="bool"/>
6387                         <field name="id" reporter:datatype="id" />
6388                         <field name="perm" reporter:datatype="link"/>
6389                         <field name="usr" reporter:datatype="link"/>
6390                         <field name="object_type" reporter:datatype="text"/>
6391                 </fields>
6392                 <links>
6393                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6394                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6395                 </links>
6396         </class>
6397         <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">
6398                 <fields oils_persist:primary="id" oils_persist:sequence="">
6399                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6400                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6401                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6402                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6403                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6404                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6405                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6406                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6407                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6408                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6409                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6410                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6411                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6412                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6413                 </fields>
6414                 <links>
6415                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6416                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6417                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6418                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6419                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6420                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6421                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6422                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6423                 </links>
6424         </class>
6425         <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">
6426                 <fields oils_persist:primary="id" oils_persist:sequence="">
6427                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6428                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6429                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6430                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6431                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6432                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6433                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6434                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6435                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6436                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6437                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6438                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6439                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6440                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6441                 </fields>
6442                 <links>
6443                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6444                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6445                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6446                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6447                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6448                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6449                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6450                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6451                 </links>
6452         </class>
6453         <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">
6454                 <fields oils_persist:primary="id" oils_persist:sequence="">
6455                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6456                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6457                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6458                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6459                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6460                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6461                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6462                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6463                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6464                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6465                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6466                 </fields>
6467                 <links>
6468                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6469                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6470                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6471                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6472                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6473                 </links>
6474         </class>
6475         <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">
6476                 <fields oils_persist:primary="id" oils_persist:sequence="">
6477                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6478                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6479                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6480                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6481                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6482                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6483                         <field reporter:label="Accepting User" name="accepting_usr" />
6484                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6485                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6486                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6487                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6488                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6489                 </fields>
6490                 <links>
6491                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6492                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6493                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6494                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6495                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6496                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6497                 </links>
6498         </class>
6499         <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">
6500                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6501                         <field name="bucket" reporter:datatype="link"/>
6502                         <field name="id" reporter:datatype="id" />
6503                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6504                         <field name="create_time" reporter:datatype="timestamp" />
6505                         <field name="pos" reporter:datatype="int" />
6506                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6507                 </fields>
6508                 <links>
6509                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6510                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6511             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6512                 </links>
6513         </class>
6514         <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">
6515                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6516                         <field name="id" reporter:datatype="id" />
6517                         <field name="item" reporter:datatype="link"/>
6518                         <field name="note" reporter:datatype="text" />
6519                 </fields>
6520                 <links>
6521                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6522                 </links>
6523         </class>
6524         <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">
6525                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6526                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6527                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6528                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6529                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6530                 </fields>
6531                 <links>
6532                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6533                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6534                 </links>
6535         </class>
6536     <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">
6537         <fields oils_persist:primary="field">
6538             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6539             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6540             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6541         </fields>
6542         <links/>
6543         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6544             <actions>
6545                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6546                 <retrieve />
6547                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6548                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6549             </actions>
6550         </permacrud>
6551     </class>
6552         <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">
6553                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6554                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6555                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6556                 </fields>
6557                 <links/>
6558         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6559             <actions>
6560                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6561                 <retrieve/>
6562                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6563                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6564             </actions>
6565         </permacrud>
6566         </class>
6567
6568
6569         <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">
6570                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6571                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6572                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6573                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6574                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6575                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6576                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6577                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6578                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6579                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6580                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6581                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6582                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6583                 </fields>
6584                 <links>
6585                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6586                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6587                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6588                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6589                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6590                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6591                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6592                 </links>
6593         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6594             <actions>
6595                 <create permission="TRANSIT_COPY">
6596                     <context link="target_copy" field="owner"/>
6597                 </create>
6598                 <retrieve/>
6599                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6600                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6601             </actions>
6602         </permacrud>
6603         </class>
6604         <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">
6605                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6606                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6607                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6608                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6609                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6610                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6611                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6612                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6613                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6614                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6615                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6616                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6617                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6618                 </fields>
6619                 <links>
6620                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6621                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6622                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6623                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6624                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6625                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6626                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6627                 </links>
6628         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6629             <actions>
6630                 <create permission="TRANSIT_COPY" context_field="owner">
6631                     <context link="target_copy" field="circ_lib"/>
6632                 </create>
6633                 <retrieve/>
6634                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6635                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6636             </actions>
6637         </permacrud>
6638         </class>
6639         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6640                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6641                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6642                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6643                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6644                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6645                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6646                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6647                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6648                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6649                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6650                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6651                 </fields>
6652                 <links>
6653                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6654                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6655                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6656                 </links>
6657         </class>
6658         <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">
6659                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6660                         <field name="grp" />
6661                         <field name="id" reporter:datatype="id" />
6662                         <field name="usr" />
6663                 </fields>
6664                 <links>
6665                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6666                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6667                 </links>
6668         </class>
6669         <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">
6670                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6671                         <field name="id" reporter:datatype="id" />
6672                         <field name="fq_field" reporter:datatype="text"/>
6673                         <field name="identity_value" reporter:datatype="text"/>
6674                         <field name="translation" reporter:datatype="text"/>
6675                         <field name="string" reporter:datatype="text"/>
6676                 </fields>
6677                 <links>
6678                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6679                 </links>
6680         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6681             <actions>
6682                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6683                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6684                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6685                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6686             </actions>
6687         </permacrud>
6688         </class>
6689         <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">
6690                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6691                         <field name="id" reporter:datatype="id" />
6692                         <field name="fm_class" reporter:datatype="text"/>
6693                         <field name="field" reporter:datatype="text"/>
6694                         <field name="owner" reporter:datatype="org_unit"/>
6695                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6696                 </fields>
6697                 <links>
6698                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6699                 </links>
6700         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6701             <actions>
6702                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6703                 <retrieve/>
6704                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6705                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6706             </actions>
6707         </permacrud>
6708         </class>
6709         <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">
6710                 <fields oils_persist:primary="code">
6711                         <field name="code" reporter:datatype="id" />
6712                         <field name="marc_code" reporter:datatype="text"/>
6713                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6714                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6715                 </fields>
6716                 <links/>
6717         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6718             <actions>
6719                 <create permission="CREATE_LOCALE" global_required="true"/>
6720                 <retrieve/>
6721                 <update permission="UPDATE_LOCALE" global_required="true"/>
6722                 <delete permission="DELETE_LOCALE" global_required="true"/>
6723             </actions>
6724         </permacrud>
6725         </class>
6726         <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">
6727                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6728                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6729                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6730                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6731             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6732                 </fields>
6733                 <links>
6734                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6735                 </links>
6736         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6737             <actions>
6738                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6739                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6740                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6741                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6742             </actions>
6743         </permacrud>
6744         </class>
6745
6746         <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">
6747                 <fields oils_persist:primary="id">
6748                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6749                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6750                 </fields>
6751                 <links/>
6752         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6753             <actions>
6754                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6755                 <retrieve/>
6756                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6757                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6758             </actions>
6759         </permacrud>
6760         </class>
6761
6762         <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">
6763                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6764                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6765                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6766                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6767                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6768                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6769                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6770                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6771                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6772                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6773                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6774                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6775                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6776                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6777                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6778                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6779                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6780                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6781                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6782                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6783                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6784                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6785                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6786                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6787                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6788                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6789                 </fields>
6790                 <links>
6791                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6792                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6793                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6794                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6795                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6796                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6797                 </links>
6798         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6799             <actions>
6800                 <create permission="user_request.create">
6801                     <context link="usr" field="home_ou"/>
6802                                 </create>
6803                 <retrieve permission="user_request.view">
6804                     <context link="usr" field="home_ou"/>
6805                                 </retrieve>
6806                 <update permission="user_request.update">
6807                     <context link="usr" field="home_ou"/>
6808                                 </update>
6809                 <delete permission="user_request.delete">
6810                     <context link="usr" field="home_ou"/>
6811                                 </delete>
6812             </actions>
6813         </permacrud>
6814         </class>
6815
6816         <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">
6817                 <fields oils_persist:primary="code">
6818                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6819                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6820                 </fields>
6821                 <links/>
6822         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6823             <actions>
6824                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6825                 <retrieve/>
6826                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6827                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6828             </actions>
6829         </permacrud>
6830         </class>
6831
6832         <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">
6833                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6834                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6835                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6836                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6837                         <field reporter:label="Ratio" name="ratio" />
6838                 </fields>
6839                 <links>
6840                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6841                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6842                 </links>
6843                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6844                         <actions>
6845                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6846                                 <retrieve/>
6847                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6848                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6849                         </actions>
6850                 </permacrud>
6851         </class>
6852
6853         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6854                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6855                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6856                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6857                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6858                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6859                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6860                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6861                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6862                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6863                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6864                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6865                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6866                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6867                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6868                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6869                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6870                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6871                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
6872                 </fields>
6873                 <links>
6874                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6875                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6876             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6877             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6878             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6879                 </links>
6880         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6881             <actions>
6882                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6883                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6884                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6885                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6886             </actions>
6887         </permacrud>
6888         </class>
6889
6890         <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">
6891                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6892                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6893                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6894                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6895                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6896                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6897                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6898                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6899                 </fields>
6900                 <links>
6901                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6902                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6903                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6904                 </links>
6905         </class>
6906
6907         <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">
6908                 <fields oils_persist:primary="code">
6909                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6910                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6911                 </fields>
6912                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6913             <actions>
6914                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6915                 <retrieve/>
6916                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6917                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6918             </actions>
6919                 </permacrud>
6920         </class>
6921
6922         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6923                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6924                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6925                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6926                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6927                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6928                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6929                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6930                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6931                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6932                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6933                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6934                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6935                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6936                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6937                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6938                 </fields>
6939                 <links>
6940                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6941                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6942                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6943                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6944                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6945                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6946                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6947                 </links>
6948         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6949             <actions>
6950                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6951                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6952                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6953                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6954             </actions>
6955         </permacrud>
6956         </class>
6957
6958         <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">
6959                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6960                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6961                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6962                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6963                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6964                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6965                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6966                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6967                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6968                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6969                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6970                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6971                 </fields>
6972                 <links>
6973                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6974                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6975                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6976                 </links>
6977         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6978             <actions>
6979                 <create   permission="ADMIN_INVOICE">
6980                                         <context link="invoice" field="receiver"/>
6981                                 </create>
6982                 <retrieve permission="ADMIN_INVOICE">
6983                                         <context link="invoice" field="receiver"/>
6984                                 </retrieve>
6985                 <update   permission="ADMIN_INVOICE">
6986                                         <context link="invoice" field="receiver"/>
6987                                 </update>
6988                                 <delete   permission="ADMIN_INVOICE">
6989                                         <context link="invoice" field="receiver"/>
6990                                 </delete>
6991             </actions>
6992         </permacrud>
6993         </class>
6994
6995         <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">
6996                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6997                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6998                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6999                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7000                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7001                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7002                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7003                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7004                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7005                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7006                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7007                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7008                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7009                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7010                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7011                 </fields>
7012                 <links>
7013                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7014                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7015                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7016                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7017                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7018                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7019                 </links>
7020         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7021             <actions>
7022                 <create   permission="ADMIN_INVOICE">
7023                                         <context link="invoice" field="receiver"/>
7024                                 </create>
7025                 <retrieve permission="ADMIN_INVOICE">
7026                                         <context link="invoice" field="receiver"/>
7027                                 </retrieve>
7028                 <update   permission="ADMIN_INVOICE">
7029                                         <context link="invoice" field="receiver"/>
7030                                 </update>
7031                                 <delete   permission="ADMIN_INVOICE">
7032                                         <context link="invoice" field="receiver"/>
7033                                 </delete>
7034             </actions>
7035         </permacrud>
7036         </class>
7037
7038         <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">
7039                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7040                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7041                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7042                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7043                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7044                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7045                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7046                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7047                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7048                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7049                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7050                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7051                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7052                 </fields>
7053                 <links>
7054                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7055                 </links>
7056         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7057             <actions>
7058                 <create permission="ADMIN_PROVIDER">
7059                     <context link="provider" field="owner"/>
7060                 </create>
7061                 <retrieve permission="ADMIN_PROVIDER">
7062                     <context link="provider" field="owner"/>
7063                 </retrieve>
7064                 <update permission="ADMIN_PROVIDER">
7065                     <context link="provider" field="owner"/>
7066                 </update>
7067                 <delete permission="ADMIN_PROVIDER">
7068                     <context link="provider" field="owner"/>
7069                 </delete>
7070             </actions>
7071         </permacrud>
7072         </class>
7073
7074         <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">
7075                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7076                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7077                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7078                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7079                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7080                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7081                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7082         </fields>
7083                 <links>
7084                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7085                 </links>
7086         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7087             <actions>
7088                 <create permission="ADMIN_PROVIDER">
7089                     <context link="provider" field="owner"/>
7090                 </create>
7091                 <retrieve permission="ADMIN_PROVIDER">
7092                     <context link="provider" field="owner"/>
7093                 </retrieve>
7094                 <update permission="ADMIN_PROVIDER">
7095                     <context link="provider" field="owner"/>
7096                 </update>
7097                 <delete permission="ADMIN_PROVIDER">
7098                     <context link="provider" field="owner"/>
7099                 </delete>
7100             </actions>
7101         </permacrud>
7102     </class>
7103         <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">
7104                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7105                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7106                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7107                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7108                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7109                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7110                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7111                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7112                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7113                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7114                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7115                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7116                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7117                 </fields>
7118                 <links>
7119                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7120                 </links>
7121         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7122             <actions>
7123                 <create permission="ADMIN_PROVIDER">
7124                     <context link="contact" jump='provider' field="owner"/>
7125                 </create>
7126                 <retrieve permission="ADMIN_PROVIDER">
7127                     <context link="contact" jump='provider' field="owner"/>
7128                 </retrieve>
7129                 <update permission="ADMIN_PROVIDER">
7130                     <context link="contact" jump='provider' field="owner"/>
7131                 </update>
7132                 <delete permission="ADMIN_PROVIDER">
7133                     <context link="contact" jump='provider' field="owner"/>
7134                 </delete>
7135             </actions>
7136         </permacrud>
7137         </class>
7138
7139         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7140                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7141                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7142                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7143                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7144                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7145                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7146                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7147                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7148                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7149                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7150                 </fields>
7151                 <links>
7152                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7153                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7154                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7155                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7156                 </links>
7157         </class>
7158
7159         <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">
7160                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7161                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7162                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7163                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7164                 </fields>
7165                 <links>
7166             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7167                 </links>
7168                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7169                         <actions>
7170                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7171                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7172                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7173                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7174                         </actions>
7175                 </permacrud>
7176         </class>
7177
7178         <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">
7179                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7180                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7181                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7182                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7183                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7184                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7185                 </fields>
7186                 <links>
7187                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7188                 </links>
7189                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7190                         <actions>
7191                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7192                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7193                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7194                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7195                         </actions>
7196                 </permacrud>
7197         </class>
7198
7199         <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">
7200                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7201                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7202                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7203                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7204                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7205                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7206                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7207                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7208                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7209                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7210                 </fields>
7211                 <links>
7212                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7213                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7214             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7215             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7216                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7217                 </links>
7218         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7219             <actions>
7220                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7221                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7222                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7223                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7224             </actions>
7225         </permacrud>
7226         </class>
7227
7228         <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">
7229                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7230                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7231                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7232                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7233                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7234                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7235                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7236                 </fields>
7237                 <links>
7238                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7239                 </links>
7240                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7241                         <actions>
7242                                 <create permission="ADMIN_FUNDING_SOURCE">
7243                     <context link="funding_source" field="owner"/>
7244                 </create>
7245                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7246                     <context link="funding_source" field="owner"/>
7247                 </retrieve>
7248                                 <update permission="ADMIN_FUNDING_SOURCE">
7249                     <context link="funding_source" field="owner"/>
7250                 </update>
7251                                 <delete permission="ADMIN_FUNDING_SOURCE">
7252                     <context link="funding_source" field="owner"/>
7253                 </delete>
7254                         </actions>
7255                 </permacrud>
7256         </class>
7257
7258         <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">
7259                 <fields oils_persist:primary="id">
7260                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7261                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7262                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7263                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7264                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7265                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7266                 </fields>
7267                 <links>
7268                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7269                 </links>
7270         </class>
7271
7272         <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">
7273                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7274                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7275                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7276                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7277                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7278                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7279                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7280                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7281                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7282                 </fields>
7283                 <links>
7284                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7285                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7286                 </links>
7287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7288                         <actions>
7289                                 <create permission="ADMIN_ACQ_FUND">
7290                     <context link="fund" field="org"/>
7291                 </create>
7292                                 <retrieve permission="ADMIN_ACQ_FUND">
7293                     <context link="fund" field="org"/>
7294                 </retrieve>
7295                                 <update permission="ADMIN_ACQ_FUND">
7296                     <context link="fund" field="org"/>
7297                 </update>
7298                                 <delete permission="ADMIN_ACQ_FUND">
7299                     <context link="fund" field="org"/>
7300                 </delete>
7301                         </actions>
7302                 </permacrud>
7303         </class>
7304
7305         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7306                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7307                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7308                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7309                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7310                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7311                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7312                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7313                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7314                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7315                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7316                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7317                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7318                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7319                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7320                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7321                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7322                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7323                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7324                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7325                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7326                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7327                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7328                 </fields>
7329                 <links>
7330                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7331                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7332             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7333             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7334             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7335             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7336             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7337             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7338             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7339             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7340             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7341                 </links>
7342         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7343             <actions>
7344                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7345                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7346                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7347                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7348             </actions>
7349         </permacrud>
7350         </class>
7351
7352         <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">
7353                 <fields oils_persist:primary="fund">
7354                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7355                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7356                 </fields>
7357                 <links>
7358                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7359                 </links>
7360         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7361             <actions>
7362                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7363                                         <context link="fund" field="org" />
7364                 </retrieve>
7365             </actions>
7366         </permacrud>
7367         </class>
7368
7369         <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">
7370                 <fields oils_persist:primary="fund">
7371                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7372                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7373                 </fields>
7374                 <links>
7375                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7376                 </links>
7377         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7378             <actions>
7379                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7380                                         <context link="fund" field="org" />
7381                 </retrieve>
7382             </actions>
7383         </permacrud>
7384         </class>
7385
7386         <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">
7387                 <fields oils_persist:primary="fund">
7388                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7389                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7390                 </fields>
7391                 <links>
7392                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7393                 </links>
7394         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7395             <actions>
7396                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7397                                         <context link="fund" field="org" />
7398                 </retrieve>
7399             </actions>
7400         </permacrud>
7401         </class>
7402
7403         <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">
7404                 <fields oils_persist:primary="fund">
7405                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7406                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7407                 </fields>
7408                 <links>
7409                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7410                 </links>
7411         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7412             <actions>
7413                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7414                                         <context link="fund" field="org" />
7415                 </retrieve>
7416             </actions>
7417         </permacrud>
7418         </class>
7419
7420         <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">
7421                 <fields oils_persist:primary="fund">
7422                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7423                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7424                 </fields>
7425                 <links>
7426                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7427                 </links>
7428         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7429             <actions>
7430                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7431                                         <context link="fund" field="org" />
7432                 </retrieve>
7433             </actions>
7434         </permacrud>
7435         </class>
7436
7437    <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">
7438         <fields oils_persist:primary="fund">
7439             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7440             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7441         </fields>
7442         <links>
7443             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7444         </links>
7445     </class>
7446
7447    <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">
7448         <fields oils_persist:primary="fund">
7449             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7450             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7451         </fields>
7452         <links>
7453             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7454         </links>
7455     </class>
7456
7457    <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">
7458         <fields oils_persist:primary="fund">
7459             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7460             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7461         </fields>
7462         <links>
7463             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7464         </links>
7465     </class>
7466
7467    <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">
7468         <fields oils_persist:primary="fund">
7469             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7470             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7471         </fields>
7472         <links>
7473             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7474         </links>
7475     </class>
7476
7477    <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">
7478         <fields oils_persist:primary="fund">
7479             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7480             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7481         </fields>
7482         <links>
7483             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7484         </links>
7485     </class>
7486
7487         <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">
7488                 <fields oils_persist:primary="funding_source">
7489                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7490                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7491                 </fields>
7492                 <links>
7493                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7494                 </links>
7495         </class>
7496
7497         <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">
7498                 <fields oils_persist:primary="funding_source">
7499                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7500                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7501                 </fields>
7502                 <links>
7503                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7504                 </links>
7505         </class>
7506
7507         <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">
7508                 <fields oils_persist:primary="funding_source">
7509                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7510                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7511                 </fields>
7512                 <links>
7513                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7514                 </links>
7515         </class>
7516
7517         <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">
7518                 <fields oils_persist:primary="fund">
7519                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7520                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7521                 </fields>
7522                 <links>
7523                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7524                 </links>
7525         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7526             <actions>
7527                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7528                                         <context link="fund" field="org" />
7529                 </retrieve>
7530             </actions>
7531         </permacrud>
7532     </class>
7533     <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">
7534         <oils_persist:source_definition><![CDATA[
7535             SELECT
7536                 acqf.*,
7537                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7538                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7539                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7540                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7541             FROM
7542                 acq.fund acqf
7543                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7544                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7545                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7546                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7547         ]]></oils_persist:source_definition>
7548         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7549             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7550             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7551             <field reporter:label="Name" name="name" reporter:datatype="text" />
7552             <field reporter:label="Year" name="year" reporter:datatype="int" />
7553             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7554             <field reporter:label="Code" name="code" reporter:datatype="text" />
7555             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7556             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7557             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7558             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7559             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7560
7561             <!-- non fund-native fields -->
7562             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7563             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7564             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7565             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7566         </fields>
7567         <links>
7568             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7569             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7570             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7571         </links>
7572         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7573             <actions>
7574                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7575             </actions>
7576         </permacrud>
7577         </class>
7578         <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">
7579                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7580                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7581                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7582                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7583                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7584                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7585                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7586                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7587                 </fields>
7588                 <links>
7589                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7590                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7591                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7592                 </links>
7593                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7594                         <actions>
7595                                 <create permission="ADMIN_ACQ_FUND">
7596                     <context link="fund" field="org"/>
7597                 </create>
7598                                 <retrieve permission="ADMIN_ACQ_FUND">
7599                     <context link="fund" field="org"/>
7600                 </retrieve>
7601                                 <update permission="ADMIN_ACQ_FUND">
7602                     <context link="fund" field="org"/>
7603                 </update>
7604                                 <delete permission="ADMIN_ACQ_FUND">
7605                     <context link="fund" field="org"/>
7606                 </delete>
7607                         </actions>
7608                 </permacrud>
7609         </class>
7610
7611     <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">
7612         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7613             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7614             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7615             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7616             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7617             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7618             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7619             <field reporter:label="Note" name="note" reporter:datatype="text" />
7620             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7621         </fields>
7622         <links>
7623             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7624             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7625             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7626         </links>
7627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7628                         <actions>
7629                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7630                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7631                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7632                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7633                         </actions>
7634                 </permacrud>
7635     </class>
7636
7637         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7638                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7639                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7640                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7641                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7642                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7643                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7644                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7645                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7646                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7647                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7648                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7649                 </fields>
7650                 <links>
7651                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7652                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7653                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7654                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7655                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7656                 </links>
7657                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7658                         <actions>
7659                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7660                         </actions>
7661                 </permacrud>
7662         </class>
7663
7664         <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">
7665                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7666                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7667                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7668                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7669                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7670                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7671                 </fields>
7672                 <links>
7673                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7674                 </links>
7675                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7676                         <actions>
7677                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7678                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7679                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7680                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7681                         </actions>
7682                 </permacrud>
7683         </class>
7684
7685         <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">
7686                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7687                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7688                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7689                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7690                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7691                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7692                         <field reporter:label="State" name="state" reporter:datatype="text" />
7693                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7694                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7695                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7696                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7697                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7698                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7699                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7700                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7701                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7702                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7703                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7704                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7705                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7706                 </fields>
7707                 <links>
7708                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7709                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7710                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7711                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7712                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7713                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7714                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7715                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7716                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7717                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7718                 </links>
7719                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7720                         <actions>
7721                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7722                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7723                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7724                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7725                         </actions>
7726                 </permacrud>
7727         </class>
7728
7729         <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">
7730                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7731                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7732                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7733                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7734                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7735                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7736                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7737                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7738                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7739                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7740                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7741                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7742                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7743                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7744                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7745                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7746                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7747                 </fields>
7748                 <links>
7749                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7750                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7751                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7752                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7753                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7754                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7755                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7756                 </links>
7757                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7758             <actions>
7759                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7760             </actions>
7761                 </permacrud>
7762         </class>
7763
7764         <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">
7765                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7766                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7767                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7768                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7769                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7770                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7771                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7772                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7773                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7774                 </fields>
7775                 <links>
7776                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7777                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7778                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7779                 </links>
7780                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7781             <actions>
7782                 <create permission="CREATE_PURCHASE_ORDER">
7783                     <context link="purchase_order" field="ordering_agency"/>
7784                 </create>
7785                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7786                     <context link="purchase_order" field="ordering_agency"/>
7787                 </retrieve>
7788                 <update permission="CREATE_PURCHASE_ORDER">
7789                     <context link="purchase_order" field="ordering_agency"/>
7790                 </update>
7791                 <delete permission="CREATE_PURCHASE_ORDER">
7792                     <context link="purchase_order" field="ordering_agency"/>
7793                 </delete>
7794             </actions>
7795                 </permacrud>
7796         </class>
7797
7798         <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">
7799                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7800                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7801                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7802                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7803                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7804                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7805                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7806                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7807                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7808                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7809                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7810                 </fields>
7811                 <links>
7812                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7813                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7814                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7815                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7816                 </links>
7817                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7818             <actions>
7819                 <create permission="CREATE_PURCHASE_ORDER">
7820                     <context link="purchase_order" field="ordering_agency"/>
7821                 </create>
7822                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7823                     <context link="purchase_order" field="ordering_agency"/>
7824                 </retrieve>
7825                 <update permission="CREATE_PURCHASE_ORDER">
7826                     <context link="purchase_order" field="ordering_agency"/>
7827                 </update>
7828                 <delete permission="CREATE_PURCHASE_ORDER">
7829                     <context link="purchase_order" field="ordering_agency"/>
7830                 </delete>
7831             </actions>
7832                 </permacrud>
7833         </class>
7834
7835         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7836                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7837                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7838                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7839                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7840                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7841                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7842                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7843                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7844                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7845                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7846                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7847                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7848                         <field reporter:label="State" name="state" reporter:datatype="text" />
7849                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7850                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7851                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7852                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7853                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7854                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7855                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7856                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7857                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7858                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7859                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7860                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7861                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7862                 </fields>
7863                 <links>
7864                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7865                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7866                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7867                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7868                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7869                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7870                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7871                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7872                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7873                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7874                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7875                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7876                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7877                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7878                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7879                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7880                 </links>
7881                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7882                         <actions>
7883                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7884                                         <context link="purchase_order" field="ordering_agency"/>
7885                                         <context link="picklist" field="org_unit"/>
7886                                 </retrieve>
7887                         </actions>
7888                 </permacrud>
7889         </class>
7890
7891         <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">
7892                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7893                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7894                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7895                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7896                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7897                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7898                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7899                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7900                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7901                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7902                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7903                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7904                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7905                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7906                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7907                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7908                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7909                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7910                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7911                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7912                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7913                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7914                 </fields>
7915                 <links>
7916                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7917                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7918                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7919                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7920                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7921                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7922                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7923                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7924                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7925                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7926                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7927                 </links>
7928                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7929                         <actions>
7930                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7931                                         <context link="purchase_order" field="ordering_agency"/>
7932                                         <context link="picklist" field="org_unit"/>
7933                                 </retrieve>
7934                         </actions>
7935                 </permacrud>
7936         </class>
7937
7938         <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">
7939                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7940                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7941                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7942                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7943                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7944                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool"/>
7945                 </fields>
7946                 <links>
7947                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7948                 </links>
7949                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7950                         <actions>
7951                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7952                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7953                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7954                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7955                         </actions>
7956                 </permacrud>
7957         </class>
7958
7959         <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">
7960                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7961                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7962                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7963                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7964                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7965                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7966                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7967                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7968                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7969                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7970                 </fields>
7971                 <links>
7972                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7973                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7974                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7975                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7976                 </links>
7977         </class>
7978
7979         <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">
7980                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7981                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7982                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7983                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7984                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7985                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7986                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7987                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
7988                 </fields>
7989                 <links>
7990                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7991                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7992                 </links>
7993         </class>
7994
7995         <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">
7996                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7997                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7998                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7999                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8000                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8001                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8002                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8003                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8004                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8005                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8006                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8007                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8008                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8009                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8010                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8011                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8012                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8013                 </fields>
8014                 <links>
8015                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8016                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8017                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8018                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8019                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8020                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8021                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8022                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8023                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8024                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8025                 </links>
8026         </class>
8027
8028         <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">
8029                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8030                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8031                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8032                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8033                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8034                 </fields>
8035                 <links/>
8036                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8037                         <actions>
8038                                 <retrieve />
8039                         </actions>
8040                 </permacrud>
8041         </class>
8042
8043         <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">
8044                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8045                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8046                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8047                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8048                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8049                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8050             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8051                 </fields>
8052                 <links/>
8053         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8054             <actions>
8055                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8056                 <retrieve />
8057                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8058                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8059             </actions>
8060         </permacrud>
8061         </class>
8062
8063         <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">
8064                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8065                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8066                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8067                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8068                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8069                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8070                 </fields>
8071                 <links/>
8072         </class>
8073         <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">
8074                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8075                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8076                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8077                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8078                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8079                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8080                 </fields>
8081                 <links>
8082                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8083                 </links>
8084         </class>
8085
8086         <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">
8087             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8088                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8089                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8090                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8091                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8092                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8093                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8094         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8095
8096             </fields>
8097             <links>
8098                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8099             </links>
8100             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8101                 <actions>
8102                     <create permission="ADMIN_PROVIDER">
8103                         <context link="provider" field="owner"/>
8104                     </create>
8105                     <retrieve permission="ADMIN_PROVIDER">
8106                         <context link="provider" field="owner"/>
8107                     </retrieve>
8108                     <update permission="ADMIN_PROVIDER">
8109                         <context link="provider" field="owner"/>
8110                     </update>
8111                     <delete permission="ADMIN_PROVIDER">
8112                         <context link="provider" field="owner"/>
8113                     </delete>
8114                 </actions>
8115             </permacrud>
8116         </class>
8117         
8118         <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">
8119             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8120                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8121                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8122                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8123                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8124             </fields>
8125             <links>
8126                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8127             </links>
8128             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8129                 <actions>
8130                     <create permission="ADMIN_PROVIDER">
8131                         <context link="provider" field="owner"/>
8132                     </create>
8133                     <retrieve permission="ADMIN_PROVIDER">
8134                         <context link="provider" field="owner"/>
8135                     </retrieve>
8136                     <update permission="ADMIN_PROVIDER">
8137                         <context link="provider" field="owner"/>
8138                     </update>
8139                     <delete permission="ADMIN_PROVIDER">
8140                         <context link="provider" field="owner"/>
8141                     </delete>
8142                 </actions>
8143             </permacrud>
8144         </class>
8145         
8146         <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">
8147             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8148                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8149                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8150                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8151                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8152                 </fields>
8153                 <links/>
8154         </class>
8155
8156         <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">
8157                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8158                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8159                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8160                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8161                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8162                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8163                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8164                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8165                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8166                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8167                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8168                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8169                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8170                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8171                 </fields>
8172                 <links>
8173                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8174                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8175                 </links>
8176         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8177             <actions>
8178                 <create permission="ADMIN_PROVIDER">
8179                     <context link="provider" field="owner"/>
8180                 </create>
8181                 <retrieve permission="ADMIN_PROVIDER">
8182                     <context link="provider" field="owner"/>
8183                 </retrieve>
8184                 <update permission="ADMIN_PROVIDER">
8185                     <context link="provider" field="owner"/>
8186                 </update>
8187                 <delete permission="ADMIN_PROVIDER">
8188                     <context link="provider" field="owner"/>
8189                 </delete>
8190             </actions>
8191         </permacrud>
8192         </class>
8193
8194         <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">
8195                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8196                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8197                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8198                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8199                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8200                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8201                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8202                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8203                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8204                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8205                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8206                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8207                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8208                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8209                 </fields>
8210                 <links>
8211                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8212                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8213                 </links>
8214         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8215             <actions>
8216                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8217                     <context link="account" jump="provider" field="owner"/>
8218                 </retrieve>
8219                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8220                     <context link="account" jump="provider" field="owner"/>
8221                 </update>
8222                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8223                     <context link="account" jump="provider" field="owner"/>
8224                 </delete>
8225             </actions>
8226         </permacrud>
8227         </class>
8228
8229
8230         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8231                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8232                         <field name="id" reporter:datatype="id" />
8233                         <field name="parent" reporter:datatype="link"/>
8234                         <field name="owner" reporter:datatype="link"/>
8235                         <field name="create_time" reporter:datatype="timestamp"/>
8236                         <field name="name" reporter:datatype="text"/>
8237                         <field name="shared" reporter:datatype="bool"/>
8238                         <field name="share_with" reporter:datatype="link"/>
8239                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8240                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8241                 </fields>
8242                 <links>
8243                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8244                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8245                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8246                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8247                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8248                 </links>
8249         </class>
8250         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8251                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8252                         <field name="id" reporter:datatype="id" />
8253                         <field name="parent" reporter:datatype="link"/>
8254                         <field name="owner" reporter:datatype="link"/>
8255                         <field name="create_time" reporter:datatype="timestamp"/>
8256                         <field name="name" reporter:datatype="text"/>
8257                         <field name="shared" reporter:datatype="bool"/>
8258                         <field name="share_with" reporter:datatype="link"/>
8259                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8260                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8261                 </fields>
8262                 <links>
8263                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8264                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8265                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8266                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8267                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8268                 </links>
8269         </class>
8270         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8271                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8272                         <field name="id" reporter:datatype="id" />
8273                         <field name="parent" reporter:datatype="link"/>
8274                         <field name="owner" reporter:datatype="link"/>
8275                         <field name="create_time" reporter:datatype="timestamp"/>
8276                         <field name="name" reporter:datatype="text"/>
8277                         <field name="shared" reporter:datatype="bool"/>
8278                         <field name="share_with" reporter:datatype="link"/>
8279                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8280                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8281                 </fields>
8282                 <links>
8283                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8284                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8285                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8286                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8287                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8288                 </links>
8289         </class>
8290         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8291                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8292                         <field name="id" reporter:datatype="id" />
8293                         <field name="owner" reporter:datatype="link"/>
8294                         <field name="create_time" reporter:datatype="timestamp"/>
8295                         <field name="name" reporter:datatype="text"/>
8296                         <field name="data" reporter:datatype="text"/>
8297                         <field name="folder" reporter:datatype="link"/>
8298                         <field name="description" reporter:datatype="text"/>
8299                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8300                 </fields>
8301                 <links>
8302                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8303                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8304                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8305                 </links>
8306         </class>
8307         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8308                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8309                         <field name="id" reporter:datatype="id" />
8310                         <field name="owner" reporter:datatype="link"/>
8311                         <field name="create_time" reporter:datatype="timestamp"/>
8312                         <field name="template" reporter:datatype="link"/>
8313                         <field name="data" reporter:datatype="text"/>
8314                         <field name="folder" reporter:datatype="link"/>
8315                         <field name="recur" reporter:datatype="bool"/>
8316                         <field name="recurrence" reporter:datatype="interval"/>
8317                         <field name="name" reporter:datatype="text"/>
8318                         <field name="description" reporter:datatype="text"/>
8319                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8320                 </fields>
8321                 <links>
8322                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8323                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8324                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8325                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8326                 </links>
8327         </class>
8328         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8329                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8330                         <field name="id" reporter:datatype="id" />
8331                         <field name="runner" reporter:datatype="link"/>
8332                         <field name="start_time" reporter:datatype="timestamp"/>
8333                         <field name="complete_time" reporter:datatype="timestamp"/>
8334                         <field name="run_time" reporter:datatype="timestamp"/>
8335                         <field name="email" reporter:datatype="text"/>
8336                         <field name="excel_format" reporter:datatype="bool"/>
8337                         <field name="csv_format" reporter:datatype="bool"/>
8338                         <field name="html_format" reporter:datatype="bool"/>
8339                         <field name="error_code" reporter:datatype="int"/>
8340                         <field name="error_text" reporter:datatype="text"/>
8341                         <field name="report" reporter:datatype="link"/>
8342                         <field name="folder" reporter:datatype="link"/>
8343                         <field name="chart_pie" reporter:datatype="bool"/>
8344                         <field name="chart_bar" reporter:datatype="bool"/>
8345                         <field name="chart_line" reporter:datatype="bool"/>
8346                 </fields>
8347                 <links>
8348                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8349                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8350                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8351                 </links>
8352         </class>
8353         <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">
8354                 <fields oils_persist:primary="id">
8355                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8356                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8357                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8358                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8359                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8360                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8361                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8362                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8363                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8364                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8365                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8366                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8367                 </fields>
8368                 <links>
8369                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8370                 </links>
8371                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8372                         <actions>
8373                                 <retrieve />
8374                         </actions>
8375                 </permacrud>
8376         </class>
8377         <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">
8378                 <fields oils_persist:primary="id">
8379                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8380                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8381                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8382                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8383                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8384                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8385                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8386                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8387                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8388                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8389                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8390                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8391                 </fields>
8392                 <links>
8393                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8394                 </links>
8395         </class>
8396         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8397                 <fields oils_persist:primary="id">
8398                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8399                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8400                         <field reporter:label="Fingerprint" name="fingerprint" />
8401                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8402                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8403                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8404                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8405                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8406                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8407                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8408                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8409                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8410                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8411                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8412                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8413                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8414                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8415                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8416                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8417                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8418                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8419                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8420                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8421                 </fields>
8422                 <links>
8423                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8424                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8425                 </links>
8426         </class>
8427         <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">
8428                 <fields oils_persist:primary="id">
8429                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8430                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8431                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8432                 </fields>
8433                 <links>
8434                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8435                 </links>
8436         </class>
8437         <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">
8438                 <fields oils_persist:primary="id">
8439                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8440                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8441                 </fields>
8442                 <links>
8443                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8444                 </links>
8445         </class>
8446         <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">
8447                 <fields oils_persist:primary="id">
8448                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8449                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8450                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8451                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8452                 </fields>
8453                 <links>
8454                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8455                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8456                 </links>
8457         </class>
8458         <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">
8459                 <fields oils_persist:primary="xact">
8460                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8461                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8462                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8463                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8464                 </fields>
8465                 <links>
8466                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8467                 </links>
8468         </class>
8469         <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">
8470                 <fields oils_persist:primary="xact">
8471                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8472                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8473                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8474                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8475                 </fields>
8476                 <links>
8477                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8478                 </links>
8479         </class>
8480         <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)">
8481                 <fields oils_persist:primary="id">
8482                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8483                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8484                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8485                 </fields>
8486                 <links>
8487                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8488                 </links>
8489         </class>
8490         <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">
8491                 <fields oils_persist:primary="id">
8492                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8493                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8494                 </fields>
8495                 <links>
8496                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8497                 </links>
8498         </class>
8499         <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">
8500                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8501                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
8502                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8503                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8504                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8505                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8506                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8507                 </fields>
8508                 <links>
8509                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8510                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8511                 </links>
8512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8513                         <actions>
8514                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8515                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8516                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8517                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8518                         </actions>
8519                 </permacrud>
8520         </class>
8521         <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">
8522                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8523                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8524                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8525                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8526                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8527                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8528                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8529                 </fields>
8530                 <links>
8531                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8532                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8533                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8534                 </links>
8535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8536                         <actions>
8537                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8538                                         <context link="formula" field="owner"/>
8539                                 </create>
8540                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8541                                         <context link="formula" field="owner"/>
8542                                 </retrieve>
8543                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8544                                         <context link="formula" field="owner"/>
8545                                 </update>
8546                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8547                                         <context link="formula" field="owner"/>
8548                                 </delete>
8549                         </actions>
8550                 </permacrud>
8551         </class>
8552
8553         <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">
8554                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8555                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8556                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8557                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8558                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8559                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8560                 </fields>
8561                 <links>
8562                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8563                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8564                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8565                 </links>
8566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8567                         <actions>
8568                                 <create permission="CREATE_PURCHASE_ORDER">
8569                                         <context link="formula" field="owner"/>
8570                 </create>
8571                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8572                                         <context link="formula" field="owner"/>
8573                 </retrieve>
8574                                 <update permission="CREATE_PURCHASE_ORDER">
8575                                         <context link="formula" field="owner"/>
8576                 </update>
8577                                 <delete permission="CREATE_PURCHASE_ORDER">
8578                                         <context link="formula" field="owner"/>
8579                 </delete>
8580                         </actions>
8581                 </permacrud>
8582         </class>
8583
8584         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8585                 <fields oils_persist:primary="id">
8586                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8587                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8588                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8589                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8590                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8591                 </fields>
8592                 <links>
8593                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8594                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8595                 </links>
8596         </class>
8597
8598         <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">
8599                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8600                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8601                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8602                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8603                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8604                 </fields>
8605                 <links>
8606                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8607                 </links>
8608                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8609                         <actions>
8610                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8611                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8612                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8613                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8614                         </actions>
8615                 </permacrud>
8616         </class>
8617
8618         <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">
8619                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8620                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8621                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8622                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8623                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8624                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8625                 </fields>
8626                 <links>
8627                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8628                 </links>
8629                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8630                         <actions>
8631                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8632                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8633                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8634                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8635                         </actions>
8636                 </permacrud>
8637         </class>
8638
8639         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8640                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8641                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8642                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8643                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8644                 </fields>
8645                 <links>
8646                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8647                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8648                 </links>
8649         </class>
8650
8651         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8652                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8653                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8654                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8655                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8656                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8657                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8658                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8659                 </fields>
8660                 <links>
8661                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8662                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8663                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8664                 </links>
8665         </class>
8666
8667         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8668                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8669                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8670                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8671                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8672                 </fields>
8673                 <links>
8674                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8675                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8676                 </links>
8677         </class>
8678
8679         <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">
8680                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8681                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8682                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8683                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8684                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8685                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8686                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8687                 </fields>
8688                 <links>
8689                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8690                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8691                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8692                 </links>
8693         </class>
8694
8695         <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">
8696                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8697                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8698                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8699                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8700                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8701                 </fields>
8702                 <links>
8703                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8704                 </links>
8705                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8706             <actions>
8707                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8708                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8709                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8710                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8711             </actions>
8712                 </permacrud>
8713         </class>
8714
8715         <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">
8716                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8717                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8718                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8719                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8720                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8721                 </fields>
8722                 <links>
8723                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8724                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8725                 </links>
8726                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8727                         <actions>
8728                                 <create permission="ADMIN_CLAIM_POLICY">
8729                                         <context link="claim_policy" field="org_unit"/>
8730                 </create>
8731                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8732                                         <context link="claim_policy" field="org_unit"/>
8733                 </retrieve>
8734                                 <update permission="ADMIN_CLAIM_POLICY">
8735                                         <context link="claim_policy" field="org_unit"/>
8736                 </update>
8737                                 <delete permission="ADMIN_CLAIM_POLICY">
8738                                         <context link="claim_policy" field="org_unit"/>
8739                 </delete>
8740                         </actions>
8741                 </permacrud>
8742         </class>
8743
8744     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8745         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8746             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8747             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8748             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8749             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8750             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8751             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8752             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8753             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8754             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8755             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8756             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8757             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8758             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8759             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8760             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8761         </fields>
8762     </class>
8763
8764     <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">
8765         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8766             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8767             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8768             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8769             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8770             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8771         </fields>
8772     </class>
8773
8774     <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">
8775         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8776             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8777             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8778             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8779             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8780             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8781             <field reporter:label="City" name="city" reporter:datatype="text"/>
8782             <field reporter:label="State" name="state" reporter:datatype="text"/>
8783             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8784             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8785             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8786         </fields>
8787     </class>
8788
8789     <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">
8790         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8791             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8792             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8793             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8794             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8795             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8796             <field reporter:label="City" name="city" reporter:datatype="text"/>
8797             <field reporter:label="State" name="state" reporter:datatype="text"/>
8798             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8799             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8800             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8801         </fields>
8802     </class>
8803
8804     <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">
8805         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8806             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8807             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8808             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8809             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8810             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8811             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8812         </fields>
8813     </class>
8814
8815         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8816                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8817                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8818                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8819                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8820                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8821                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8822                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8823                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8824                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8825                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8826                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8827                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8828                 </fields>
8829                 <links>
8830                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8831                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8832                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8833                 </links>
8834         </class>
8835
8836         <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">
8837                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8838                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8839                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8840                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8841                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8842                 </fields>
8843                 <links>
8844                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8845                 </links>
8846         </class>
8847
8848     <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">
8849         <fields>
8850             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8851             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8852             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8853         </fields>
8854                 <links>
8855                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8856                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8857                 </links>
8858     </class>
8859
8860     <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">
8861         <fields>
8862             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8863             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8864         </fields>
8865                 <links>
8866                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8867                 </links>
8868     </class>
8869
8870     <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">
8871         <fields>
8872             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8873             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8874             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8875         </fields>
8876                 <links>
8877                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8878                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8879                 </links>
8880     </class>
8881
8882     <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">
8883         <fields>
8884             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8885             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8886         </fields>
8887                 <links>
8888                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8889                 </links>
8890     </class>
8891
8892     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8893                 <oils_persist:source_definition>
8894
8895             SELECT  DISTINCT l.*
8896               FROM  action.unfulfilled_hold_loops l
8897                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8898               WHERE l.count = m.max
8899
8900                 </oils_persist:source_definition>
8901         <fields>
8902             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8903             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8904             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8905         </fields>
8906                 <links>
8907                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8908                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8909                 </links>
8910     </class>
8911
8912         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8913                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8914                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8915                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8916                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8917                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8918                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8919                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8920                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8921                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8922                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8923                 </fields>
8924                 <links>
8925                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8926                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8927                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8928                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8929                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8930                 </links>
8931         </class>
8932
8933         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8934                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8935                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8936                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8937                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8938                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8939                 </fields>
8940                 <links>
8941                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8942                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8943                 </links>
8944         </class>
8945
8946         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8947                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8948                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8949                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8950                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8951                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8952                 </fields>
8953                 <links>
8954                 </links>
8955         </class>
8956
8957         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8958                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8959                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8960                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8961                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8962                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8963                 </fields>
8964                 <links>
8965                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8966                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8967                 </links>
8968         </class>
8969         
8970         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8971                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8972                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8973                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8974                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8975                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8976                 </fields>
8977                 <links>
8978                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8979                 </links>
8980         </class>
8981         
8982         <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">
8983                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8984                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8985                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8986                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8987                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8988                 </fields>
8989                 <links>
8990                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8991                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8992                 </links>
8993         </class>
8994
8995         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8996                 <fields oils_persist:primary="name">
8997                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8998                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8999                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9000                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9001                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9002                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9003                 </fields>
9004                 <links>
9005                 </links>
9006         </class>
9007
9008         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9009                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9010                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9011                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9012                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9013                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9014                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9015                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9016                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9017                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9018                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9019                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9020                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9021                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9022                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9023                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9024                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9025                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9026                 </fields>
9027                 <links>
9028                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9029                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9030                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9031                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9032                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9033                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9034                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9035                 </links>
9036         </class>
9037
9038         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9039                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9040                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9041                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9042                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9043                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9044                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9045                 </fields>
9046                 <links>
9047                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9048                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9049                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9050                 </links>
9051         </class>
9052
9053         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9054                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9055                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9056                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9057                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9058                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9059                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9060                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9061                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9062                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9063                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9064                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9065                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9066                 </fields>
9067                 <links>
9068                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9069                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9070                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9071                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9072                 </links>
9073         </class>
9074
9075         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9076                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9077                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9078                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9079                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9080                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9081                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9082                 </fields>
9083                 <links>
9084                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9085                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9086                 </links>
9087         </class>
9088
9089         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9090                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9091                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9092                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9093                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9094                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9095                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9096                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9097                 </fields>
9098                 <links>
9099                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9100                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9101                 </links>
9102         </class>
9103
9104         <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">
9105                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9106                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9107                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9108                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9109                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9110                 </fields>
9111                 <links>
9112                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9113                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9114                 </links>
9115         </class>
9116
9117         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9118                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9119                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9120                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9121                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9122                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9123                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9124                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9125                 </fields>
9126                 <links>
9127                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9128                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9129                 </links>
9130         </class>
9131
9132         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9133                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9134                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9135                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9136                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9137                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9138                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9139                 </fields>
9140                 <links>
9141                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9142                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9143                 </links>
9144         </class>
9145
9146         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9147                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9148                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9149                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9150                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9151                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9152                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9153                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9154                 </fields>
9155                 <links>
9156                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9157                 </links>
9158         </class>
9159
9160         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9161                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9162                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9163                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9164                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9165                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9166                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9167                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9168                 </fields>
9169                 <links>
9170                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9171                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9172                 </links>
9173         </class>
9174
9175         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9176                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9177                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9178                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9179                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9180                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9181                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9182                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9183                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9184                 </fields>
9185                 <links>
9186                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9187                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9188                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9189                 </links>
9190         </class>
9191
9192         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9193                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9194                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9195                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9196                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9197                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9198                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9199                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9200                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9201                 </fields>
9202                 <links>
9203                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9204                 </links>
9205         </class>
9206
9207         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9208                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9209                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9210                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9211                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9212                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9213                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9214                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9215                 </fields>
9216                 <links>
9217                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9218                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9219                 </links>
9220         </class>
9221
9222         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9223                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9224                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9225                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9226                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9227                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9228                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9229                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9230                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9231                 </fields>
9232                 <links>
9233                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9234                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9235                 </links>
9236         </class>
9237
9238         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9239                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9240                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9241                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9242                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9243                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9244                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9245                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9246                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9247                 </fields>
9248                 <links>
9249                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9250                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9251                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9252                 </links>
9253         </class>
9254
9255         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9256                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9257                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9258                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9259                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9260                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9261                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9262                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9263                 </fields>
9264                 <links>
9265                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9266                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9267                 </links>
9268         </class>
9269
9270         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9271                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9272                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9273                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9274                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9275                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9276                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9277                 </fields>
9278                 <links>
9279                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9280                 </links>
9281         </class>
9282
9283         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9284                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9285                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9286                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9287                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9288                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9289                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9290                 </fields>
9291                 <links>
9292                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9293                 </links>
9294         </class>
9295
9296         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9297                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9298                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9299                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9300                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9301                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9302                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9303                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9304                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9305                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9306                 </fields>
9307                 <links>
9308                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9309                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9310                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9311                 </links>
9312         </class>
9313
9314         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator 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="Operator" name="operator" reporter:datatype="text"/>
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                 </links>
9326         </class>
9327
9328         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9329                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9330                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9331                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9332                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9333                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9334                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9335                 </fields>
9336                 <links>
9337                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9338                 </links>
9339         </class>
9340
9341         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9342                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9343                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9344                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9345                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9346                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9347                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9348                 </fields>
9349                 <links>
9350                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9351                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9352                 </links>
9353         </class>
9354
9355         <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">
9356                 <fields oils_persist:primary="id">
9357                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9358                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9359                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9360                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9361                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9362                 </fields>
9363                 <links>
9364                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9365                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9366                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9367                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9368                 </links>
9369         </class>
9370
9371         <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">
9372                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9373                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9374                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9375                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9376                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9377                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9378                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9379                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9380                 </fields>
9381                 <links/>
9382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9383                         <actions>
9384                                 <retrieve/>
9385                         </actions>
9386                 </permacrud>
9387         </class>
9388
9389         <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">
9390                 <fields oils_persist:primary="ptype_key">
9391                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9392                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9393                 </fields>
9394                 <links/>
9395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9396                         <actions>
9397                                 <retrieve/>
9398                         </actions>
9399                 </permacrud>
9400         </class>
9401
9402         <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">
9403                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9404                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9405                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9406                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9407                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9408                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9409                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9410                 </fields>
9411                 <links>
9412                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9413                 </links>
9414                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9415                         <actions>
9416                                 <retrieve/>
9417                         </actions>
9418                 </permacrud>
9419         </class>
9420
9421         <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">
9422                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9423                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9424                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9425                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9426                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9427                 </fields>
9428                 <links>
9429                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9430                 </links>
9431                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9432                         <actions>
9433                                 <retrieve/>
9434                         </actions>
9435                 </permacrud>
9436         </class>
9437
9438     <class
9439         id="uvs"
9440         controller="open-ils.cstore open-ils.pcrud"
9441         oils_obj:fieldmapper="url_verify::session"
9442         oils_persist:tablename="url_verify.session"
9443         reporter:label="URL Verification Session"
9444     >
9445         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9446             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9447             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9448                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9449             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9450             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9451             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9452             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9453             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9454             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9455         </fields>
9456
9457         <links>
9458             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9459             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9460             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9461             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9462             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9463         </links>
9464
9465         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9466             <actions>
9467                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9468             </actions>
9469         </permacrud>
9470
9471     </class>
9472
9473     <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">
9474         <oils_persist:source_definition>
9475             SELECT
9476                 cbrebi.id AS id,  -- so we can have a pkey in our view
9477                 uvs.id AS session,
9478                 uvs.owning_lib,
9479                 cbrebi.target_biblio_record_entry
9480             FROM url_verify.session uvs
9481             JOIN container.biblio_record_entry_bucket cbreb
9482                 ON (uvs.container = cbreb.id)
9483             JOIN container.biblio_record_entry_bucket_item cbrebi
9484                 ON (cbrebi.bucket = cbreb.id)
9485         </oils_persist:source_definition>
9486         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9487             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9488             <field reporter:label="Session" name="session" reporter:datatype="link" />
9489             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9490             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9491         </fields>
9492         <links>
9493             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9494             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9495             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9496         </links>
9497         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9498             <actions>
9499                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9500             </actions>
9501         </permacrud>
9502     </class>
9503
9504     <class
9505         id="uvus"
9506         controller="open-ils.cstore open-ils.pcrud"
9507         oils_obj:fieldmapper="url_verify::url_selector"
9508         oils_persist:tablename="url_verify.url_selector"
9509         reporter:label="URL Verification URL Selector"
9510     >
9511         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9512             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9513             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9514                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9515             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9516         </fields>
9517
9518         <links>
9519             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9520             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9521         </links>
9522
9523         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9524             <actions>
9525                 <create permission="URL_VERIFY">
9526                     <context link="session" field="owning_lib"/>
9527                 </create>
9528                 <retrieve permission="URL_VERIFY">
9529                     <context link="session" field="owning_lib"/>
9530                 </retrieve>
9531                 <update permission="URL_VERIFY">
9532                     <context link="session" field="owning_lib"/>
9533                 </update>
9534                 <delete permission="URL_VERIFY">
9535                     <context link="session" field="owning_lib"/>
9536                 </delete>
9537             </actions>
9538         </permacrud>
9539
9540     </class>
9541
9542     <class
9543         id="uvu"
9544         controller="open-ils.cstore open-ils.pcrud"
9545         oils_obj:fieldmapper="url_verify::url"
9546         oils_persist:tablename="url_verify.url"
9547         reporter:label="URL Verification URL"
9548     >
9549         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9550             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9551                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9552                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9553                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9554                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9555             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9556             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9557             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9558             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9559             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9560             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9561             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9562             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9563             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9564             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9565             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9566             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9567             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9568         </fields>
9569
9570         <links>
9571             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9572             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9573             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9574             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9575             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9576         </links>
9577
9578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9579             <actions>
9580                 <create permission="URL_VERIFY">
9581                     <context link="session" field="owning_lib"/>
9582                 </create>
9583                 <retrieve permission="URL_VERIFY">
9584                     <context link="session" field="owning_lib"/>
9585                 </retrieve>
9586                 <update permission="URL_VERIFY">
9587                     <context link="session" field="owning_lib"/>
9588                 </update>
9589                 <delete permission="URL_VERIFY">
9590                     <context link="session" field="owning_lib"/>
9591                 </delete>
9592             </actions>
9593         </permacrud>
9594
9595     </class>
9596
9597     <class
9598         id="uvva"
9599         controller="open-ils.cstore open-ils.pcrud"
9600         oils_obj:fieldmapper="url_verify::verification_attempt"
9601         oils_persist:tablename="url_verify.verification_attempt"
9602         reporter:label="URL Verification Attempt"
9603     >
9604         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9605             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9606                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9607                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9608             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9609             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9610         </fields>
9611
9612         <links>
9613             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9614             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
9615         </links>
9616
9617         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9618             <actions>
9619                 <create permission="URL_VERIFY">
9620                     <context link="session" field="owning_lib"/>
9621                 </create>
9622                 <retrieve permission="URL_VERIFY">
9623                     <context link="session" field="owning_lib"/>
9624                 </retrieve>
9625                 <update permission="URL_VERIFY">
9626                     <context link="session" field="owning_lib"/>
9627                 </update>
9628                 <delete permission="URL_VERIFY">
9629                     <context link="session" field="owning_lib"/>
9630                 </delete>
9631             </actions>
9632         </permacrud>
9633
9634     </class>
9635
9636     <class
9637         id="uvuv"
9638         controller="open-ils.cstore open-ils.pcrud"
9639         oils_obj:fieldmapper="url_verify::url_verification"
9640         oils_persist:tablename="url_verify.url_verification"
9641         reporter:label="URL Verification"
9642     >
9643         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9644             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9645                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9646                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9647             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9648             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9649             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9650             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9651                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9652         </fields>
9653
9654         <links>
9655             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9656             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9657             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9658         </links>
9659
9660         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9661             <actions>
9662                 <create permission="URL_VERIFY">
9663                     <context link="attempt" jump="session" field="owning_lib"/>
9664                 </create>
9665                 <retrieve permission="URL_VERIFY">
9666                     <context link="attempt" jump="session" field="owning_lib"/>
9667                 </retrieve>
9668                 <update permission="URL_VERIFY">
9669                     <context link="attempt" jump="session" field="owning_lib"/>
9670                 </update>
9671                 <delete permission="URL_VERIFY">
9672                     <context link="attempt" jump="session" field="owning_lib"/>
9673                 </delete>
9674             </actions>
9675         </permacrud>
9676
9677     </class>
9678
9679         <class
9680                 id="cfdi"
9681                 controller="open-ils.cstore open-ils.pcrud"
9682                 oils_obj:fieldmapper="config::filter_dialog_interface"
9683                 oils_persist:tablename="config.filter_dialog_interface"
9684                 reporter:label="FilterDialog Interface">
9685                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9686                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9687                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9688                 </fields>
9689                 <links>
9690                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9691                 </links>
9692                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9693                         <actions>
9694                                 <retrieve />
9695                         </actions>
9696                 </permacrud>
9697         </class>
9698
9699         <class
9700                 id="cfdfs"
9701                 controller="open-ils.cstore open-ils.pcrud"
9702                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9703                 oils_persist:tablename="config.filter_dialog_filter_set"
9704                 reporter:label="FilterDialog Filter Set">
9705                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9706                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9707                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9708                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9709                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9710                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9711                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9712                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9713                 </fields>
9714                 <links>
9715                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9716                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9717                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9718                 </links>
9719                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9720                         <actions>
9721                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9722                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9723                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9724                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9725                         </actions>
9726                 </permacrud>
9727
9728         </class>
9729
9730         <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">
9731                 <fields oils_persist:primary="code">
9732                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9733                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9734                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9735                 </fields>
9736                 <links/>
9737                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9738                         <actions>
9739                                 <retrieve/>
9740                         </actions>
9741                 </permacrud>
9742         </class>
9743
9744         <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">
9745                 <oils_persist:source_definition>
9746
9747             SELECT  b.id,
9748                     MAX(dcp.edit_date) AS last_delete_date
9749              FROM   biblio.record_entry b
9750                     JOIN asset.call_number cn ON (cn.record = b.id)
9751                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9752              WHERE  NOT b.deleted
9753              GROUP BY b.id
9754              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9755
9756                 </oils_persist:source_definition>
9757                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9758                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9759                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9760                 </fields>
9761                 <links>
9762                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9763                 </links>
9764                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9765                         <actions>
9766                                 <retrieve/>
9767                         </actions>
9768                 </permacrud>
9769         </class>
9770
9771         <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">
9772                 <oils_persist:source_definition>
9773
9774             -- -- 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.
9775             -- -- 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
9776             -- -- may not.
9777             -- SELECT
9778             --     bre.id AS "bib_id",
9779             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9780             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9781             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9782             -- FROM (
9783                 SELECT
9784                     y.bre AS "id",
9785                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9786                     y.hold_count AS "hold_count",
9787                     (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"
9788                 FROM (
9789                         SELECT
9790                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9791                             COUNT(*) AS "hold_count"
9792                         FROM action.hold_request h
9793                         WHERE
9794                             cancel_time IS NULL
9795                             AND fulfillment_time IS NULL
9796                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9797                         GROUP BY 1
9798                     )y LEFT JOIN (
9799                         SELECT 
9800                             (SELECT id
9801                                 FROM biblio.record_entry 
9802                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9803                             ) AS "bre", 
9804                             COUNT(*) AS "copy_count"
9805                         FROM asset.copy
9806                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9807                         WHERE copy.holdable 
9808                             AND NOT copy.deleted 
9809                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9810                         GROUP BY 1
9811                     )x ON x.bre = y.bre
9812                 -- )z RIGHT JOIN (
9813                 --     SELECT id
9814                 --     FROM biblio.record_entry
9815                 --     WHERE NOT deleted
9816                 -- )bre ON (z.bib_id = bre.id)
9817                 
9818
9819                 </oils_persist:source_definition>
9820                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9821                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9822                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9823                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9824                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9825                 </fields>
9826                 <links>
9827                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9828                 </links>
9829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9830                         <actions>
9831                                 <retrieve/>
9832                         </actions>
9833                 </permacrud>
9834         </class>
9835
9836         <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">
9837                 <oils_persist:source_definition>
9838             SELECT *,
9839                 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,
9840                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9841             FROM
9842                 (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
9843                     FROM
9844                         action.hold_request ahr
9845                         JOIN reporter.hold_request_record rhrr USING (id)
9846                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9847                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9848                     WHERE
9849                         ahr.cancel_time IS NULL
9850                         AND ahr.fulfillment_time IS NULL
9851                     GROUP BY bib_record, pickup_lib
9852                 )x
9853                 JOIN
9854                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9855                     FROM
9856                         action.hold_request ahr
9857                         JOIN reporter.hold_request_record rhrr USING (id)
9858                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9859                     WHERE
9860                         ahr.cancel_time IS NULL
9861                         AND ahr.fulfillment_time IS NULL
9862                     GROUP BY bib_record
9863                 )y
9864                 USING (id)
9865                 </oils_persist:source_definition>
9866                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9867                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9868                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9869                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9870                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9871                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9872                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9873                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9874                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9875                 </fields>
9876                 <links>
9877                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9878                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9879                 </links>
9880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9881                         <actions>
9882                                 <retrieve/>
9883                         </actions>
9884                 </permacrud>
9885         </class>
9886
9887         <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">
9888                 <oils_persist:source_definition>
9889             SELECT
9890                 ac.id,
9891                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9892                 MAX(actac.xact_start) AS last_circ
9893             FROM asset.copy ac
9894                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9895             GROUP BY ac.id
9896
9897             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9898             --SELECT
9899             --    ac.id,
9900             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9901             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9902             --FROM asset.copy ac
9903             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9904             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9905             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9906                 </oils_persist:source_definition>
9907                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9908                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9909                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9910                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9911                 </fields>
9912                 <links>
9913                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9914                 </links>
9915                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9916                         <actions>
9917                                 <retrieve/>
9918                         </actions>
9919                 </permacrud>
9920         </class>
9921
9922         <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">
9923                 <fields oils_persist:primary="id">
9924                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
9925                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
9926                 </fields>
9927                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9928                         <actions>
9929                                 <retrieve/>
9930                         </actions>
9931                 </permacrud>
9932         </class>
9933
9934         <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">
9935                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
9936                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9937                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
9938                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9939                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9940                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9941                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9942                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9943                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
9944                 </fields>
9945                 <links>
9946                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
9947                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9948                 </links>
9949                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9950                         <actions>
9951                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9952                                 <retrieve/>
9953                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9954                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9955                         </actions>
9956                 </permacrud>
9957         </class>
9958
9959         <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">
9960                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
9961                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9962                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
9963                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9964                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9965                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9966                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9967                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9968                 </fields>
9969                 <links>
9970                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
9971                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9972                 </links>
9973                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9974                         <actions>
9975                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9976                                 <retrieve/>
9977                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9978                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9979                         </actions>
9980                 </permacrud>
9981         </class>
9982
9983
9984         <!-- ********************************************************************************************************************* -->
9985         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9986         <!-- ********************************************************************************************************************* -->
9987         <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">
9988                 <fields oils_persist:primary="id">
9989                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9990                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9991                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9992                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9993                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9994                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9995                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9996                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9997                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9998                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9999                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10000                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10001                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10002                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10003                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10004                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10005                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10006                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10007                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10008                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10009                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10010                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10011                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10012                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10013                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10014                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10015                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10016                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10017                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10018                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10019                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10020                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10021                 </fields>
10022                 <links>
10023                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10024                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10025                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10026                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10027                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10028                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10029                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10030                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10031                 </links>
10032         </class>
10033
10034         <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">
10035                 <fields oils_persist:primary="id">
10036                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10037                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10038                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10039                 </fields>
10040                 <links>
10041                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10042                 </links>
10043         </class>
10044
10045         <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">
10046                 <fields oils_persist:primary="id">
10047                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10048                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10049                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10050                 </fields>
10051                 <links>
10052                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10053                 </links>
10054         </class>
10055
10056         <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">
10057                 <fields oils_persist:primary="id">
10058                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10059
10060                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10061                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10062                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10063
10064                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10065                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10066                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10067
10068                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10069                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10070
10071                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10072                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10073                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10074
10075                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10076                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10077
10078                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10079                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10080                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10081
10082                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10083                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10084                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10085
10086                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10087                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10088                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10089                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10090
10091                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10092                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10093
10094                 </fields>
10095                 <links>
10096                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10097                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10098                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10099                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10100                 </links>
10101         </class>
10102
10103         <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">
10104                 <oils_persist:source_definition>
10105
10106             SELECT
10107                 po.ordering_agency AS ordering_agency,
10108                 po.id AS purchase_order,
10109                 li.id AS lineitem,
10110                 lid.id AS lineitem_detail,
10111                 cpa.id AS claim_policy_action
10112             FROM
10113                 acq.lineitem_detail lid
10114                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10115                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10116                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10117                 JOIN acq.claim_policy_action cpa ON (
10118                     cpa.claim_policy = cp.id
10119
10120                     -- we only care about claim policy actions whose claim
10121                     -- interval we'd reached or exceeded
10122                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10123
10124                     -- filter out all claim policy actions where claim events
10125                     -- have occurred on or after the action's action_interval
10126                     AND NOT EXISTS (
10127                         SELECT 1
10128                         FROM
10129                             acq.claim_event evt
10130                             JOIN acq.claim claim ON (
10131                                 claim.id = evt.claim
10132                                 AND claim.lineitem_detail = lid.id
10133                             )
10134                         WHERE
10135                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10136                     )
10137                 )
10138             WHERE
10139                 lid.cancel_reason IS NULL
10140                 AND li.cancel_reason IS NULL -- belt/suspenders
10141                 AND po.cancel_reason IS NULL -- belt/suspenders
10142                 AND lid.recv_time IS NULL
10143                 AND po.state = 'on-order'
10144             ORDER BY 1, 2, 3, 4, 5
10145
10146                 </oils_persist:source_definition>
10147                 <fields>
10148                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10149                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10150                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10151                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10152                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10153                 </fields>
10154                 <links>
10155                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10156                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10157                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10158                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10159                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10160                 </links>
10161         </class>
10162         <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">
10163                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10164                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10165                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10166                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10167                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10168                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10169                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10170                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10171                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10172                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10173                 </fields>
10174                 <links>
10175                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10176                 </links>
10177     </class>
10178         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10179                 <oils_persist:source_definition>
10180             SELECT * FROM acq.lineitem_summary 
10181                                 WHERE item_count > (invoice_count + cancel_count)
10182         </oils_persist:source_definition>
10183                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10184                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10185                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10186                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10187                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10188                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10189                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10190                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10191                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10192                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10193                 </fields>
10194                 <links>
10195                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10196                 </links>
10197     </class>
10198         <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">
10199                 <oils_persist:source_definition>
10200
10201                         SELECT  t.*
10202                           FROM  action.transit_copy t
10203                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10204                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10205                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10206
10207                 </oils_persist:source_definition>
10208                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10209                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10210                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10211                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10212                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10213                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10214                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10215                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10216                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10217                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10218                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10219                 </fields>
10220                 <links>
10221                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10222                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10223                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10224                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10225                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10226                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10227                 </links>
10228         </class>
10229
10230     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10231                 <oils_persist:source_definition>
10232
10233         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10234                 SELECT
10235                         cp.id as copy,
10236                         COUNT(circ.id),
10237                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10238                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10239                 FROM
10240                         asset.copy cp
10241                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10242                 GROUP BY 1, 3, 4
10243                 UNION
10244                 SELECT
10245                         cp.id as copy,
10246                         COUNT(circ.id),
10247                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10248                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10249                 FROM
10250                         asset.copy cp
10251                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10252                 GROUP BY 1, 3, 4
10253                 UNION
10254                 SELECT
10255                         id as copy,
10256                         circ_count,
10257                         -1 AS year,
10258                         false as is_renewal
10259                 FROM
10260                         extend_reporter.legacy_circ_count
10261         )x GROUP BY 1, 3, 4
10262
10263                 </oils_persist:source_definition>
10264         <fields>
10265             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10266             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10267             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10268             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10269         </fields>
10270                 <links>
10271                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10272                 </links>
10273                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10274                         <actions>
10275                                 <retrieve/>
10276                         </actions>
10277                 </permacrud>
10278     </class>
10279
10280         <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">
10281                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10282                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10283                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10284                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10285                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10286                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10287                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10288                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10289                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10290                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10291                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10292                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10293                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10294                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10295                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10296                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10297                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10298                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10299                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10300                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10301                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10302                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10303                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10304                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10305                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10306                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10307                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10308                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10309                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10310                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10311                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10312                 </fields>
10313                 <links>
10314                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10315                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10316                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10317                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10318                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10319                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10320                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10321                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10322                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10323                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10324                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10325                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10326                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10327                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10328                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10329                 </links>
10330         </class>
10331
10332     <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">
10333         <fields oils_persist:primary="id">
10334             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10335             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10336             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10337             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10338             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10339             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10340             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10341             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10342             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10343             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10344             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10345             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10346             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10347             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10348             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10349             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10350             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10351             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10352             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10353             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10354             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10355             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10356             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10357             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10358             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10359             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10360             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10361             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10362             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10363             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10364             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10365             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10366             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10367             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10368         </fields>
10369         <links>
10370             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10371             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10372             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10373             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10374             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10375         </links>
10376     </class>
10377
10378     <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">
10379         <fields oils_persist:primary="id">
10380             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10381             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10382             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10383             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10384         </fields>
10385         <links>
10386             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10387             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10388         </links>
10389     </class>
10390
10391     <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">
10392         <fields oils_persist:primary="owning_lib">
10393             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10394             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10395             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10396         </fields>
10397         <links>
10398             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10399         </links>
10400     </class>
10401
10402     <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">
10403         <fields oils_persist:primary="id">
10404             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10405             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10406             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10407             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10408             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10409         </fields>
10410         <links>
10411             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10412             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10413             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10414         </links>
10415     </class>
10416
10417     <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">
10418         <fields oils_persist:primary="circ_lib">
10419             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10420             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10421             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10422             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10423         </fields>
10424         <links>
10425             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10426             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10427         </links>
10428     </class>
10429
10430     <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">
10431         <fields oils_persist:primary="id">
10432             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10433             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10434             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10435             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10436             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10437         </fields>
10438         <links>
10439             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10440             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10441             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10442         </links>
10443     </class>
10444
10445     <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">
10446         <fields oils_persist:primary="home_ou">
10447             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10448             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10449             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10450             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10451         </fields>
10452         <links>
10453             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10454             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10455         </links>
10456     </class>
10457         <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">
10458                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10459                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10460                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10461                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10462                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10463                 </fields>
10464                 <links>
10465                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10466                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10467                 </links>
10468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10469                         <actions>
10470                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10471                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10472                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10473                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10474                         </actions>
10475                 </permacrud>
10476         </class>
10477         <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">
10478                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10479                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10480                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10481                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10482                 </fields>
10483                 <links>
10484                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10485                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10486                         </links>
10487                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10488                 <actions>
10489                                 <create permission="ADMIN_ACQ_FUND_TAG">
10490                                         <context link="tag" field="owner"/>
10491                                 </create>
10492                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10493                                         <context link="tag" field="owner"/>
10494                                 </retrieve>
10495                                 <update permission="ADMIN_ACQ_FUND_TAG">
10496                                         <context link="tag" field="owner"/>
10497                                 </update>
10498                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10499                                         <context link="tag" field="owner"/>
10500                                 </delete>
10501                         </actions>
10502                 </permacrud>
10503         </class>
10504         <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">
10505                 <oils_persist:source_definition><![CDATA[
10506                 SELECT
10507                         poi.purchase_order AS purchase_order,
10508                         ii.invoice AS invoice,
10509                         NULL AS lineitem,
10510                         poi.id AS po_item,
10511                         NULL AS picklist
10512                 FROM
10513                         acq.po_item poi
10514                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10515                 UNION SELECT
10516                         jub.purchase_order AS purchase_order,
10517                         ie.invoice AS invoice,
10518                         jub.id AS lineitem,
10519                         NULL AS po_item,
10520                         jub.picklist AS picklist
10521                 FROM
10522                         acq.lineitem jub
10523                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10524                 UNION SELECT
10525                         ii.purchase_order AS purchase_order,
10526                         ii.invoice AS invoice,
10527                         NULL AS lineitem,
10528                         NULL AS po_item,
10529                         NULL AS picklist
10530                 FROM
10531                         acq.invoice_item ii
10532                 WHERE ii.po_item IS NULL
10533                 UNION SELECT
10534                         ie.purchase_order AS purchase_order,
10535                         ie.invoice AS invoice,
10536                         NULL AS lineitem,
10537                         NULL AS po_item,
10538                         NULL AS picklist
10539                 FROM
10540                         acq.invoice_entry ie
10541                 WHERE ie.lineitem IS NULL
10542                 UNION SELECT
10543                         NULL AS purchase_order,
10544                         NULL AS invoice,
10545                         jub.id AS lineitem,
10546                         NULL AS po_item,
10547                         jub.picklist AS picklist
10548                 FROM
10549                         acq.lineitem jub
10550                 WHERE jub.purchase_order IS NULL
10551                 ]]></oils_persist:source_definition>
10552                 <fields>
10553                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10554                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10555                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10556                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10557                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10558                 </fields>
10559                 <links>
10560                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10561                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10562                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10563                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10564                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10565                 </links>
10566         </class>
10567         <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">
10568                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10569                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10570                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10571                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10572                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10573                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10574                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10575                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10576                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10577                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10578                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10579                 </fields>
10580                 <links>
10581                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10582                 </links>
10583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10584                         <actions>
10585                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10586                                 <retrieve/>
10587                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10588                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10589                         </actions>
10590                 </permacrud>
10591         </class>
10592
10593         <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">
10594                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10595                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10596                         <field name="date_applied" reporter:datatype="timestamp"/>
10597                         <field name="org" reporter:datatype="org_unit"/>
10598                         <field name="original_value" reporter:datatype="text"/>
10599                         <field name="new_value" reporter:datatype="text"/>
10600                         <field name="field_name" reporter:datatype="link"/>
10601                 </fields>
10602                 <links>
10603                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10604                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10605                 </links>
10606                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10607                         <actions>
10608                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10609                                 <retrieve/>
10610                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10611                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10612                         </actions>
10613                 </permacrud>
10614         </class>
10615         <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">
10616                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10617                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10618                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10619                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10620                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10621                 </fields>
10622                 <links>
10623                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10624                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10625                 </links>
10626         </class>
10627         <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">
10628                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10629                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10630                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10631                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10632                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10633                 </fields>
10634                 <links>
10635                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10636                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10637                 </links>
10638         </class>
10639
10640
10641         <!-- ********************************************************************************************************************* -->
10642
10643 </IDL>
10644
10645 <!--
10646     vim:noet:ts=4:sw=4:
10647 -->