]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
ce64b5fb9b669a25e7525bf710db99a5950fa379
[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="Owner" name="owner" reporter:datatype="link"/>
220                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
221                 </fields>
222                 <links>
223                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
224                 </links>
225                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
226                         <actions>
227                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
228                                 <retrieve permission="CREATE_IMPORT_TRASH_FIELD UPDATE_IMPORT_TRASH_FIELD DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
229                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
230                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
231                         </actions>
232                 </permacrud>
233         </class>
234
235         <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">
236                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
237                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
238                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
239                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
240                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
241                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
242                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
243                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
244                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
245                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
246                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
247                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
248                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
249                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
250                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
251                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
252                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
253                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
254                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
255                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
256                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
257                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
258                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
259                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
260                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
261                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
262                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
263                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
264                 </fields>
265                 <links>
266                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
267                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
268                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
269                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
270                 </links>
271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
272                         <actions>
273                                 <create permission="CREATE_IMPORT_ITEM">
274                     <context link="definition" field="owner"/>
275                                 </create>
276                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
277                     <context link="definition" field="owner"/>
278                                 </retrieve>
279                                 <update permission="UPDATE_IMPORT_ITEM">
280                     <context link="definition" field="owner"/>
281                                 </update>
282                                 <delete permission="DELETE_IMPORT_ITEM">
283                     <context link="definition" field="owner"/>
284                                 </delete>
285                         </actions>
286                 </permacrud>
287         </class>
288
289         <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">
290                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
291                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
292                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
293                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
294                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
295                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
296                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
297                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
298                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
299                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
300                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
301                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
302                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
303                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
304                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
305                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
306                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
307                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
308                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
309                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
310                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
311                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
312                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
313                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
314                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
315                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
316                 </fields>
317                 <links>
318                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
319                 </links>
320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
321                         <actions>
322                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
323                                 <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"/>
324                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
325                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
326                         </actions>
327                 </permacrud>
328         </class>
329
330         <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">
331                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
332                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
333                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
334                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
335                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
336                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
337                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
338                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
339                 </fields>
340                 <links>
341                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
342                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
343                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
344                 </links>
345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
346                         <actions>
347                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
348                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
349                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
350                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
351                         </actions>
352                 </permacrud>
353         </class>
354
355         <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">
356                 <fields oils_persist:primary="code">
357                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
358                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
359                 </fields>
360                 <links>
361                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
362                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
363                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
364                 </links>
365                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
366                         <actions>
367                                 <retrieve/>
368                         </actions>
369                 </permacrud>
370         </class>
371
372         <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">
373                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
374                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
375                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
376                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
377                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
378                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
379                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
380                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
381                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
382                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
383                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
384                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
385                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
386                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
387                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
388                 </fields>
389                 <links>
390                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
391                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
392                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
393                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
394             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
395             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
396             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
397                 </links>
398                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
399                         <actions>
400                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
401                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
402                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
403                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
404                         </actions>
405                 </permacrud>
406         </class>
407
408         <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">
409                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
410                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
411                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
412                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
413                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
414                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
415                 </fields>
416                 <links/>
417                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
418                         <actions>
419                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
420                 <retrieve/>
421                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
422                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
423                         </actions>
424                 </permacrud>
425         </class>
426
427         <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">
428                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
429                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
430                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
431                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
432                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
433                 </fields>
434                 <links>
435                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
436                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
437                 </links>
438                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
439                         <actions>
440                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
441                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
442                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
443                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
444                         </actions>
445                 </permacrud>
446         </class>
447
448         <class id="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">
449                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
450                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
451                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
452                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
453                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
454                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
455                 </fields>
456                 <links>
457                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
458                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
459                 </links>
460                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
461                         <actions>
462                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
463                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
464                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
465                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
466                         </actions>
467                 </permacrud>
468         </class>
469
470         <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">
471                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
472                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
473                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
474                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
475                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
476                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
477                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
478                 </fields>
479                 <links>
480                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
481                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
482                 </links>
483                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
484                         <actions>
485                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
486                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
487                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
488                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
489                         </actions>
490                 </permacrud>
491         </class>
492
493         <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">
494                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
495                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
496                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
497                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
498                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
499                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
500                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
501                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
502                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
503                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
504                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
505                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
506                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
507                 </fields>
508                 <links>
509                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
510                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
511                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
512             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
513             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
514                 </links>
515                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
516                         <actions>
517                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
518                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
519                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
520                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
521                         </actions>
522                 </permacrud>
523         </class>
524
525         <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">
526                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
527                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
528                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
529                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
530                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
531                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
532                 </fields>
533                 <links/>
534                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
535                         <actions>
536                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
537                 <retrieve/>
538                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
539                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
540                         </actions>
541                 </permacrud>
542         </class>
543
544         <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">
545                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
546                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
547                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
548                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
549                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
550                 </fields>
551                 <links>
552                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
553                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
554                 </links>
555                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
556                         <actions>
557                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
558                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
559                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
560                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
561                         </actions>
562                 </permacrud>
563         </class>
564
565         <class id="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">
566                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
567                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
568                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
569                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
570                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
571                 </fields>
572                 <links>
573                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
574                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
575                 </links>
576                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
577                         <actions>
578                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
579                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
580                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
581                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
582                         </actions>
583                 </permacrud>
584         </class>
585
586         <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">
587                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
588                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
589                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
590                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
591                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
592                 </fields>
593                 <links>
594                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
595                 </links>
596                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
597                         <actions>
598                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
599                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
600                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
601                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
602                         </actions>
603                 </permacrud>
604         </class>
605
606         <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">
607                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
608                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
609                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
610                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
611                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
612                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
613                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
614                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
615             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
616                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
617                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
618                 </fields>
619                 <links>
620                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
621                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
622                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
623                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
624                 </links>
625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
626                         <actions>
627                                 <create permission="ADMIN_IMPORT_MATCH_SET">
628                     <context link="match_set" field="owner"/>
629                                 </create>
630                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
631                     <context link="match_set" field="owner"/>
632                                 </retrieve>
633                                 <update permission="ADMIN_IMPORT_MATCH_SET">
634                     <context link="match_set" field="owner"/>
635                                 </update>
636                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
637                     <context link="match_set" field="owner"/>
638                                 </delete>
639                         </actions>
640                 </permacrud>
641         </class>
642
643         <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">
644                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
645                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
646                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
647                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
648                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
649                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
650                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
651                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
652                 </fields>
653                 <links>
654                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
655                 </links>
656                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
657                         <actions>
658                                 <create permission="ADMIN_IMPORT_MATCH_SET">
659                     <context link="match_set" field="owner"/>
660                                 </create>
661                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
662                     <context link="match_set" field="owner"/>
663                                 </retrieve>
664                                 <update permission="ADMIN_IMPORT_MATCH_SET">
665                     <context link="match_set" field="owner"/>
666                                 </update>
667                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
668                     <context link="match_set" field="owner"/>
669                                 </delete>
670                         </actions>
671                 </permacrud>
672         </class>
673
674         <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">
675                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
676                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
677                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
678                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
679                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
680                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
681                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
682                 </fields>
683                 <links>
684                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
685                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
686                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
687                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
688                 </links>
689         </class>
690
691     <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">
692         <fields oils_persist:primary="name">
693             <field reporter:label="Name" name="name" reporter:datatype="text"/>
694             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
695             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
696             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
697         </fields>
698         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
699             <actions>
700                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
701                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
702                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
703                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
704             </actions>
705         </permacrud>
706     </class>
707
708     <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">
709         <fields oils_persist:primary="id">
710             <field reporter:label="ID" name="id" reporter:datatype="id"/>
711             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
712             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
713             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
714             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
715         </fields>
716         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
717             <actions>
718                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
719                 <retrieve/>
720                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
721                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
722             </actions>
723         </permacrud>
724     </class>
725
726         <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">
727                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
728                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
729                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
730                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
731                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
732                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
733                 </fields>
734                 <links>
735                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
736                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
737                 </links>
738         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
739             <actions>
740                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
741                 <retrieve/>
742                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
743                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
744             </actions>
745         </permacrud>
746         </class>
747
748         <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">
749                 <fields oils_persist:primary="name">
750                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
751                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
752                         <field reporter:label="Description" name="description" reporter:datatype="text" />
753                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
754                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
755                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
756                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
757                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
758                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
759                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
760                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
761                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
762                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
763                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
764                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
765                 </fields>
766                 <links>
767                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
768                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
769                 </links>
770         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
771             <actions>
772                 <create permission="ADMIN_SVF" global_required="true"/>
773                 <retrieve/>
774                 <update permission="ADMIN_SVF" global_required="true"/>
775                 <delete permission="ADMIN_SVF" global_required="true"/>
776             </actions>
777         </permacrud>
778         </class>
779
780         <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">
781                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
782                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
783                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
784                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
785             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
786                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
787                 </fields>
788                 <links/>
789         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
790             <actions>
791                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
792                 <retrieve/>
793                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
794                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
795             </actions>
796         </permacrud>
797         </class>
798
799         <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">
800                 <fields oils_persist:primary="id">
801                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
802                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
803                 </fields>
804                 <links>
805                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
806                 </links>
807         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
808             <actions>
809                 <retrieve/>
810             </actions>
811         </permacrud>
812         </class>
813
814         <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">
815                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
816                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
817                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
818                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
819                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
820                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
821                 </fields>
822                 <links>
823                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
824                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
825                 </links>
826         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
827             <actions>
828                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
829                 <retrieve/>
830                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
831                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
832             </actions>
833         </permacrud>
834         </class>
835
836         <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">
837                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
838                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true"/>
839                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
840                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
841                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
842                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
843                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
844                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
845             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
846                 </fields>
847                 <links>
848                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
849                 </links>
850         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
851             <actions>
852                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
853                 <retrieve/>
854                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
855                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
856             </actions>
857         </permacrud>
858         </class>
859
860         <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">
861                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
862                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
863                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
864                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
865                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
866                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
867                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
868                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
869                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
870                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
871                 </fields>
872                 <links>
873                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
874                 </links>
875         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
876             <actions>
877                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
878                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
879                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
880                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
881             </actions>
882         </permacrud>
883         </class>
884
885     <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">
886         <fields oils_persist:primary="name">
887             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
888             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
889             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
890             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
891             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
892             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
893             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
894             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
895             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
896             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
897         </fields>
898         <links>
899             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
900             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
901         </links>
902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
903             <actions>
904                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
905                 <retrieve/>
906                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
907                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
908             </actions>
909         </permacrud>
910     </class>
911
912     <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">
913         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
914             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id"/>
915             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
916             <field reporter:label="Name" name="name" reporter:datatype="text"/>
917             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
918             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
919             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
920             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
921         </fields>
922         <links>
923             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
924         </links>
925         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
926             <actions>
927                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
928                 <retrieve/>
929                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
930                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
931             </actions>
932         </permacrud>
933     </class>
934
935         <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">
936                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
937                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
938                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
939                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
940                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
941                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
942                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
943                 </fields>
944                 <links>
945             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
946             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
947                 </links>
948                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
949                         <actions>
950                                 <retrieve/>
951                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
952                         </actions>
953                 </permacrud>
954         </class>
955
956         <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">
957                 <fields oils_persist:primary="key">
958                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
959                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
960                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
961                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
962                 </fields>
963                 <links/>
964                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
965                         <actions>
966                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
967                                 <retrieve/>
968                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
969                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
970                         </actions>
971                 </permacrud>
972         </class>
973
974         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
975                 <fields oils_persist:primary="module">
976                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
977                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
978                 </fields>
979                 <links/>
980         </class>
981
982         <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">
983                 <fields oils_persist:primary="module">
984                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
985                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
986                 </fields>
987                 <links/>
988                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
989                         <actions>
990                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
991                                 <retrieve/>
992                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
993                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
994                         </actions>
995                 </permacrud>
996         </class>
997
998         <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">
999                 <fields oils_persist:primary="module">
1000                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1001                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1002                 </fields>
1003                 <links/>
1004                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1005                         <actions>
1006                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1007                                 <retrieve/>
1008                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1009                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1010                         </actions>
1011                 </permacrud>
1012         </class>
1013
1014         <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">
1015                 <fields oils_persist:primary="module">
1016                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1017                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1018                 </fields>
1019                 <links/>
1020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1021                         <actions>
1022                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1023                                 <retrieve/>
1024                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1025                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1026                         </actions>
1027                 </permacrud>
1028         </class>
1029
1030         <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">
1031                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1032                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1033                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1034                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1035                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1036                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1037                 </fields>
1038                 <links>
1039                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1040                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1041                 </links>
1042                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1043                         <actions>
1044                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1045                     <context link="event_def" field="owner"/>
1046                 </create>
1047                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1048                     <context link="event_def" field="owner"/>
1049                 </retrieve>
1050                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1051                     <context link="event_def" field="owner"/>
1052                 </update>
1053                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1054                     <context link="event_def" field="owner"/>
1055                 </delete>
1056                         </actions>
1057                 </permacrud>
1058         </class>
1059
1060         <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">
1061                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1062                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1063                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1064                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1065                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1066                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1067                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1068                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1069                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1070                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1071                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1072                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1073                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1074                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1075                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1076                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1077                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1078                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1079                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1080                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1081                 </fields>
1082                 <links>
1083                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1084                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1085                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1086                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1087                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1088                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1089                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1090                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1091                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1092                 </links>
1093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1094                         <actions>
1095                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1096                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1097                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1098                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1099                         </actions>
1100                 </permacrud>
1101         </class>
1102
1103         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1104                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1105                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1106                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1107                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1108                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1109                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1110                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1111                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1112                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1113                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1114                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1115                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1116                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1117                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1118                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1119                 </fields>
1120                 <links>
1121                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1122                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1123                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1124                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1125                 </links>
1126         </class>
1127
1128         <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">
1129                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1130                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1131                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1132                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1133                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1134                 </fields>
1135                 <links>
1136                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1137                 </links>
1138                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1139                         <actions>
1140                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1141                     <context link="event_def" field="owner"/>
1142                 </create>
1143                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1144                     <context link="event_def" field="owner"/>
1145                 </retrieve>
1146                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1147                     <context link="event_def" field="owner"/>
1148                 </update>
1149                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1150                     <context link="event_def" field="owner"/>
1151                 </delete>
1152                         </actions>
1153                 </permacrud>
1154         </class>
1155
1156         <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">
1157                 <oils_persist:source_definition><![CDATA[
1158                 SELECT  atevdef.hook,
1159                         atevdef.name,
1160                         atevdef.reactor,
1161                         atev.id,
1162                         atev.event_def,
1163                         atev.add_time,
1164                         atev.run_time,
1165                         atev.start_time,
1166                         atev.update_time,
1167                         atev.complete_time,
1168                         atev.update_process,
1169                         atev.state,
1170                         atev.user_data,
1171                         atev.template_output,
1172                         atev.error_output,
1173                         atev.async_output,
1174                         targ_circ.id AS target_circ,
1175                         targ_ahr.id AS target_hold,
1176                         COALESCE(
1177                                 targ_circ.circ_lib,
1178                                 targ_ahr.pickup_lib
1179                         ) AS perm_lib
1180                 FROM action_trigger.event atev
1181                 JOIN action_trigger.event_definition atevdef ON
1182                         (atevdef.id = atev.event_def)
1183                 JOIN action_trigger.hook ath ON
1184                         (ath.key = atevdef.hook)
1185                 LEFT JOIN action.circulation targ_circ ON
1186                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1187                 LEFT JOIN action.hold_request targ_ahr ON
1188                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1189                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1190                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1191                                 'circ.staff.max_visible_event_age',
1192                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1193                         ) UNION
1194                         SELECT '1000 YEARS'::INTERVAL AS value
1195                 ) ous)
1196                 ]]></oils_persist:source_definition>
1197                 <fields oils_persist:primary="id">
1198                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1199                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1200                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1201                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1202                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1203                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1204                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1205                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1206                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1207                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1208                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1209                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1210                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1211                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1212                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1213                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1214                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1215                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1216                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1217                 </fields>
1218                 <links>
1219                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1220                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1221                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1222                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1223                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1224                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1225                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1226                 </links>
1227                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1228                         <actions>
1229                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1230                         </actions>
1231                 </permacrud>
1232         </class>
1233
1234         <class id="aws" controller="open-ils.cstore" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1235                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1236                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1237                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1238                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1239                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1240                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1241                 </fields>
1242                 <links>
1243                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1244                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1245                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1246                 </links>
1247         </class>
1248
1249         <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">
1250                 <fields oils_persist:primary="code">
1251                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1252                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1253                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1254                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1255                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1256                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1257                 </fields>
1258                 <links/>
1259         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1260             <actions>
1261                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1262                 <retrieve/>
1263                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1264                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1265             </actions>
1266         </permacrud>
1267         </class>
1268
1269         <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">
1270                 <fields oils_persist:primary="code">
1271                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1272                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1273                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1274                 </fields>
1275                 <links/>
1276         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1277             <actions>
1278                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1279                 <retrieve/>
1280                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1281                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1282             </actions>
1283         </permacrud>
1284         </class>
1285
1286         <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">
1287                 <fields oils_persist:primary="code">
1288                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1289                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1290                 </fields>
1291                 <links/>
1292         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1293             <actions>
1294                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1295                 <retrieve/>
1296                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1297                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1298             </actions>
1299         </permacrud>
1300         </class>
1301
1302         <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">
1303                 <fields oils_persist:primary="code">
1304                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1305                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1306                 </fields>
1307                 <links/>
1308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1309             <actions>
1310                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1311                 <retrieve/>
1312                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1313                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1314             </actions>
1315         </permacrud>
1316         </class>
1317
1318         <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">
1319                 <fields oils_persist:primary="code">
1320                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1321                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1322                 </fields>
1323                 <links/>
1324         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1325             <actions>
1326                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1327                 <retrieve/>
1328                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1329                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1330             </actions>
1331         </permacrud>
1332         </class>
1333
1334         <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">
1335                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1336                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1337                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1338                 </fields>
1339                 <links/>
1340         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1341             <actions>
1342                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1343                 <retrieve/>
1344                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1345                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1346             </actions>
1347         </permacrud>
1348         </class>
1349
1350         <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">
1351                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1352                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1353                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1354                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1355                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1356                 </fields>
1357         <links>
1358             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1359             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1360             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1361         </links>
1362         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1363             <actions>
1364                 <create permission="UPDATE_COPY">
1365                     <context link="target_copy" field="circ_lib"/>
1366                 </create>
1367                 <retrieve/>
1368                 <update permission="UPDATE_COPY">
1369                     <context link="target_copy" field="circ_lib"/>
1370                 </update>
1371                 <delete permission="UPDATE_COPY">
1372                     <context link="target_copy" field="circ_lib"/>
1373                 </delete>
1374             </actions>
1375         </permacrud>
1376         </class>
1377
1378         <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">
1379                 <fields oils_persist:primary="code">
1380                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1381                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1382                 </fields>
1383                 <links/>
1384         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1385             <actions>
1386                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1387                 <retrieve/>
1388                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1389                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1390             </actions>
1391         </permacrud>
1392         </class>
1393
1394         <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">
1395                 <fields oils_persist:primary="code">
1396                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1397                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1398                 </fields>
1399                 <links/>
1400         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1401             <actions>
1402                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1403                 <retrieve/>
1404                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1405                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1406             </actions>
1407         </permacrud>
1408         </class>
1409
1410         <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">
1411                 <fields oils_persist:primary="code">
1412                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1413                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1414                 </fields>
1415                 <links/>
1416         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1417             <actions>
1418                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1419                 <retrieve/>
1420                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1421                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1422             </actions>
1423         </permacrud>
1424         </class>
1425
1426     <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">
1427         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1428             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1429             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1430             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1431             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1432             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1433             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1434             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1435             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1436             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1437             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1438             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1439             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1440             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1441             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1442             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1443             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1444             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1445         </fields>
1446         <links/>
1447         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1448             <actions>
1449                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1450                 <retrieve/>
1451                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1452                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1453             </actions>
1454         </permacrud>
1455     </class>
1456
1457     <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">
1458         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1459             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1460             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1461             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1462             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1463             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1464             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1465             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1466             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1467             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1468             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1469             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1470             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1471             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1472             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1473             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1474             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1475             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1476             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1477             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1478         </fields>
1479         <links/>
1480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1481             <actions>
1482                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1483                 <retrieve/>
1484                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1485                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1486             </actions>
1487         </permacrud>
1488     </class>
1489
1490     <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">
1491         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1492             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1493             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1494             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1495             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1496             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1497         </fields>
1498         <links>
1499             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1500             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1501             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1502         </links>
1503         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1504             <actions>
1505                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1506                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1507                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1508                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1509             </actions>
1510         </permacrud>
1511     </class>
1512
1513         <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">
1514                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1515                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1516                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1517                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1518                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1519                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1520                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1521                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1522                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1523                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1524                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1525                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1526                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1527                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1528                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1529                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1530                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1531             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1532                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1533                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1534                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1535                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1536                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1537                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1538                 </fields>
1539                 <links>
1540                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1541                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1542                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1543                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1544                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1545                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1546                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1547                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1548                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1549                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1550                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1551                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1552                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1553             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1554                 </links>
1555         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1556             <actions>
1557                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1558                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1559                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1560                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1561             </actions>
1562         </permacrud>
1563         </class>
1564
1565         <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">
1566                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1567                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1568                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1569                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1570                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1571                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1572                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1573                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1574                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1575                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1576                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1577                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1578                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1579                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1580                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1581                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1582             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1583                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1584                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1585             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1586                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1587                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1588                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1589                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1590             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1591             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1592             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1593                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1594                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1595                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1596                 </fields>
1597                 <links>
1598                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1599                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1600                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1601                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1602                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1603                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1604                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1605                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1606                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1607                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1608                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1609                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1610                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1611                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1612             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1613                 </links>
1614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1615             <actions>
1616                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1617                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1618                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1619                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1620             </actions>
1621         </permacrud>
1622         </class>
1623
1624     <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">
1625         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1626             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1627             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1628             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1629         </fields>
1630         <links/>
1631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1632             <actions>
1633                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1634                 <retrieve/>
1635                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1636                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1637             </actions>
1638         </permacrud>
1639     </class>
1640
1641     <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">
1642         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1643             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1644             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1645             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1646             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1647             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1648             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1649             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1650         </fields>
1651         <links>
1652             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1653         </links>
1654         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1655             <actions>
1656                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1657                 <retrieve/>
1658                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1659                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1660             </actions>
1661         </permacrud>
1662     </class>
1663
1664     <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">
1665         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1666             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1667             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1668             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1669             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1670             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1671         </fields>
1672         <links>
1673             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1674             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1675         </links>
1676         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1677             <actions>
1678                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1679                     <context link="matchpoint" field="org_unit"/>
1680                 </create>
1681                 <retrieve/>
1682                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1683                     <context link="matchpoint" field="org_unit"/>
1684                 </update>
1685                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1686                     <context link="matchpoint" field="org_unit"/>
1687                 </delete>
1688             </actions>
1689         </permacrud>
1690     </class>
1691
1692     <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">
1693         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1694             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1695             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1696             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1697         </fields>
1698         <links>
1699             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1700             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1701         </links>
1702         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1703             <actions>
1704                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1705                     <context link="limit_set" field="owning_lib"/>
1706                 </create>
1707                 <retrieve/>
1708                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1709                     <context link="limit_set" field="owning_lib"/>
1710                 </update>
1711                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1712                     <context link="limit_set" field="owning_lib"/>
1713                 </delete>
1714             </actions>
1715         </permacrud>
1716     </class>
1717     <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">
1718         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1719             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1720             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1721             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1722         </fields>
1723         <links>
1724             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1725             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1726         </links>
1727         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1728             <actions>
1729                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1730                     <context link="limit_set" field="owning_lib"/>
1731                 </create>
1732                 <retrieve/>
1733                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1734                     <context link="limit_set" field="owning_lib"/>
1735                 </update>
1736                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1737                     <context link="limit_set" field="owning_lib"/>
1738                 </delete>
1739             </actions>
1740         </permacrud>
1741     </class>
1742
1743     <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">
1744         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1745             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1746             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1747             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1748             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1749         </fields>
1750         <links>
1751             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1752             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1753         </links>
1754         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1755             <actions>
1756                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1757                     <context link="limit_set" field="owning_lib"/>
1758                 </create>
1759                 <retrieve/>
1760                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1761                     <context link="limit_set" field="owning_lib"/>
1762                 </update>
1763                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1764                     <context link="limit_set" field="owning_lib"/>
1765                 </delete>
1766             </actions>
1767         </permacrud>
1768     </class>
1769
1770         <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">
1771                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
1772                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1773                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1774                 </fields>
1775                 <links/>
1776         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1777             <actions>
1778                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
1779                 <retrieve/>
1780                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
1781                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
1782             </actions>
1783         </permacrud>
1784         </class>
1785
1786         <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">
1787                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
1788                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
1789                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
1790                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
1791                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
1792                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1793                 </fields>
1794                 <links>
1795                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1796                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
1797                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
1798                 </links>
1799         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1800             <actions>
1801                 <create permission="ADMIN_SURVEY">
1802                     <context link="survey" field="owner"/>
1803                 </create>
1804                 <retrieve/>
1805                 <update permission="ADMIN_SURVEY">
1806                     <context link="survey" field="owner"/>
1807                 </update>
1808                 <delete permission="ADMIN_SURVEY">
1809                     <context link="survey" field="owner"/>
1810                 </delete>
1811             </actions>
1812         </permacrud>
1813         </class>
1814         <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">
1815                 <fields oils_persist:primary="id" oils_persist:sequence="">
1816                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1817                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1818                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1819                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1820                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1821                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1822                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1823                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1824                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1825                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1826                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1827                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1828                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1829                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1830                 </fields>
1831                 <links>
1832                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1833                 </links>
1834         </class>
1835         <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">
1836                 <fields oils_persist:primary="id" oils_persist:sequence="">
1837                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
1838                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
1839                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
1840                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
1841                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
1842                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
1843                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
1844                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
1845                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
1846                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
1847                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
1848                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
1849                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
1850                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
1851                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
1852                 </fields>
1853                 <links>
1854                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1855                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
1856                 </links>
1857         </class>
1858         <class id="aun" controller="open-ils.cstore" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
1859                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
1860                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
1861                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
1862                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
1863                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
1864                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
1865                         <field reporter:label="User" name="usr" reporter:datatype="link" />
1866                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
1867                 </fields>
1868                 <links>
1869                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1870                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
1871                 </links>
1872         </class>
1873         <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">
1874                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
1875                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
1876                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
1877                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1878                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
1879                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
1880                 </fields>
1881                 <links>
1882                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1883                 </links>
1884         </class>
1885         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
1886                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
1887                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
1888                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
1889                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
1890                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
1891                 </fields>
1892                 <links>
1893                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
1894                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1895                 </links>
1896         </class>
1897         <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">
1898                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
1899                         <field name="field" reporter:datatype="link"/>
1900                         <field name="id" reporter:datatype="id" />
1901                         <field name="source" reporter:datatype="link"/>
1902                         <field name="value" reporter:datatype="text"/>
1903                 </fields>
1904                 <links>
1905                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
1906                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
1907                 </links>
1908         </class>
1909         <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">
1910                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
1911                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1912                         <field reporter:label="Item" name="item" reporter:datatype="int" />
1913                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1914                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1915                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1916                 </fields>
1917                 <links>
1918                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
1919                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1920                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1921                 </links>
1922         </class>
1923         <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">
1924                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
1925                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
1926                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
1927                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
1928                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
1929                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
1930                 </fields>
1931                 <links>
1932                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
1933                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
1934                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1935                 </links>
1936         </class>
1937         <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">
1938                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
1939                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
1940                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
1941                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
1942                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
1943                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
1944                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
1945                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
1946                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
1947                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
1948                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
1949                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
1950                 </fields>
1951                 <links>
1952                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
1953                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
1954                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
1955                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
1956                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
1957                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1958                 </links>
1959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1960             <actions>
1961                 <create permission="TRANSIT_COPY" context_field="owner">
1962                     <context link="target_copy" field="circ_lib"/>
1963                 </create>
1964                 <retrieve/>
1965                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
1966                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
1967             </actions>
1968         </permacrud>
1969         </class>
1970         <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">
1971                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
1972                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
1973                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
1974                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
1975                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
1976                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
1977                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
1978                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
1979                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
1980                 </fields>
1981                 <links>
1982                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
1983                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
1984                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
1985                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
1986                 </links>
1987         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1988             <actions>
1989                 <create permission="ADMIN_SURVEY">
1990                     <context link="survey" field="owner"/>
1991                 </create>
1992                 <retrieve/>
1993                 <update permission="ADMIN_SURVEY">
1994                     <context link="survey" field="owner"/>
1995                 </update>
1996                 <delete permission="ADMIN_SURVEY">
1997                     <context link="survey" field="owner"/>
1998                 </delete>
1999             </actions>
2000         </permacrud>
2001         </class>
2002         <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">
2003                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2004                         <field name="bucket" />
2005                         <field name="id" reporter:datatype="id" />
2006                         <field name="target_copy" reporter:datatype="link"/>
2007                         <field name="create_time" reporter:datatype="timestamp" />
2008                         <field name="pos" reporter:datatype="int" />
2009                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2010                 </fields>
2011                 <links>
2012                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2013                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2014             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2015                 </links>
2016         </class>
2017         <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">
2018                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2019                         <field name="id" reporter:datatype="id" />
2020                         <field name="item" reporter:datatype="link"/>
2021                         <field name="note" reporter:datatype="text" />
2022                 </fields>
2023                 <links>
2024                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2025                 </links>
2026         </class>
2027
2028         <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">
2029                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2030                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2031                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2032                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2033                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2034                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2035                 </fields>
2036                 <links>
2037                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2038                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2039                 </links>
2040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2041                         <actions>
2042                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2043                                 <retrieve/>
2044                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2045                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2046                         </actions>
2047                 </permacrud>
2048         </class>
2049
2050         <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">
2051                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2052                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2053                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2054                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2055                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2056                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2057                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2058                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2059                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2060                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2061                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2062                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2063                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2064                 </fields>
2065                 <links>
2066                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2067                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2068                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2069                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2070                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2071                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2072                 </links>
2073                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2074                         <actions>
2075                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2076                                 <retrieve/>
2077                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2078                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2079                         </actions>
2080                 </permacrud>
2081         </class>
2082
2083         <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">
2084                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2085                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2086                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2087                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2088                 </fields>
2089                 <links>
2090                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2091                 </links>
2092                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2093                         <actions>
2094                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2095                                 <retrieve/>
2096                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2097                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2098                         </actions>
2099                 </permacrud>
2100         </class>
2101
2102         <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">
2103                 <fields oils_persist:primary="code">
2104                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2105                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2106                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2107                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2108                 </fields>
2109                 <links>
2110                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2111                 </links>
2112                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2113                         <actions>
2114                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2115                                 <retrieve/>
2116                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2117                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2118                         </actions>
2119                 </permacrud>
2120         </class>
2121
2122         <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">
2123                 <fields oils_persist:primary="code">
2124                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2125                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2126                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2127                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2128                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2129                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2130                 </fields>
2131                 <links>
2132                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2133                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2134                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2135                 </links>
2136                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2137                         <actions>
2138                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2139                                 <retrieve/>
2140                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2141                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2142                         </actions>
2143                 </permacrud>
2144         </class>
2145
2146     <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">
2147         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2148             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2149             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2150             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2151         </fields>
2152         <links>
2153             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2154             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2155         </links>
2156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2157             <actions>
2158                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2159                 <retrieve/>
2160                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2161                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2162             </actions>
2163         </permacrud>
2164     </class>
2165
2166         <class id="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">
2167                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2168                         <field name="active" reporter:datatype="bool"/>
2169                         <field name="create_date" reporter:datatype="timestamp"/>
2170                         <field name="creator" />
2171                         <field name="deleted" reporter:datatype="bool"/>
2172                         <field name="edit_date" reporter:datatype="timestamp"/>
2173                         <field name="editor" />
2174                         <field name="id" reporter:datatype="id" />
2175                         <field name="last_xact_id" />
2176                         <field name="marc" />
2177                         <field name="source" />
2178                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2179                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2180                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2181                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2182                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2183                 </fields>
2184                 <links>
2185                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2186                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2187                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2188                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2189                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2190                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2191                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2192                 </links>
2193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2194                         <actions>
2195                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2196                                 <retrieve/>
2197                                 <update permission="UPDATE_MARC" global_required="true"/>
2198                                 <delete permission="UPDATE_MARC" global_required="true"/>
2199                         </actions>
2200                 </permacrud>
2201         </class>
2202         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2203                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2204                         <field name="char_encoding" />
2205                         <field name="id" />
2206                         <field name="record" />
2207                         <field name="record_status" />
2208                         <field name="thesaurus" />
2209                 </fields>
2210                 <links>
2211                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2212                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2213                 </links>
2214         </class>
2215         <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">
2216                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2217                         <field name="id" reporter:datatype="id" />
2218                         <field name="bib" reporter:datatype="link" />
2219                         <field name="authority" reporter:datatype="link" />
2220                 </fields>
2221                 <links>
2222                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2223                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2224                 </links>
2225         </class>
2226         <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">
2227                 <fields oils_persist:primary="code" oils_persist:sequence="">
2228                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2229                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2230                 </fields>
2231                 <links/>
2232         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2233             <actions>
2234                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2235                 <retrieve/>
2236                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2237                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2238             </actions>
2239         </permacrud>
2240         </class>
2241         <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">
2242                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2243                         <field name="accepting_usr" />
2244                         <field name="amount" reporter:datatype="money" />
2245                         <field name="amount_collected" reporter:datatype="money" />
2246                         <field name="approval_code" reporter:datatype="text"/>
2247                         <field name="cash_drawer" reporter:datatype="link"/>
2248                         <field name="cc_first_name" reporter:datatype="text"/>
2249                         <field name="cc_last_name" reporter:datatype="text"/>
2250                         <field name="cc_number" reporter:datatype="text"/>
2251                         <field name="cc_order_number" reporter:datatype="text"/>
2252                         <field name="cc_type" reporter:datatype="text"/>
2253                         <field name="cc_processor" reporter:datatype="text"/>
2254                         <field name="expire_month" reporter:datatype="int" />
2255                         <field name="expire_year" reporter:datatype="int" />
2256                         <field name="id" reporter:datatype="id" />
2257                         <field name="note" reporter:datatype="text"/>
2258                         <field name="payment_ts" reporter:datatype="timestamp"/>
2259                         <field name="xact" reporter:datatype="link"/>
2260                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2261                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2262                 </fields>
2263                 <links>
2264                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2265                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2266                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2267                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2268                 </links>
2269         </class>
2270         <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">
2271                 <fields oils_persist:primary="name">
2272                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2273                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2274                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2275                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2276                 </fields>
2277                 <links/>
2278         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2279             <actions>
2280                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2281                 <retrieve/>
2282                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2283                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2284             </actions>
2285         </permacrud>
2286         </class>
2287
2288         <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">
2289                 <fields oils_persist:primary="alias">
2290                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2291                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2292                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2293                 </fields>
2294                 <links>
2295                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2296                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2297                 </links>
2298         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2299             <actions>
2300                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2301                 <retrieve/>
2302                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2303                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2304             </actions>
2305         </permacrud>
2306         </class>
2307
2308         <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">
2309                 <fields oils_persist:primary="name">
2310                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2311                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2312                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2313                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2314                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2315                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2316                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2317                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2318                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2319                 </fields>
2320                 <links>
2321                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2322                 </links>
2323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2324             <actions>
2325                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2326                 <retrieve/>
2327                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2328                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2329             </actions>
2330         </permacrud>
2331         </class>
2332
2333         <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">
2334                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2335                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2336                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2337                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2338                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2339                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2340                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2341                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2342                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2343                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2344                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2345                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2346                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2347                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2348                 </fields>
2349                 <links>
2350                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2351                 </links>
2352         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2353             <actions>
2354                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2355                 <retrieve/>
2356                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2357                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2358             </actions>
2359         </permacrud>
2360         </class>
2361         <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">
2362                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2363                         <field name="id" reporter:datatype="id" />
2364                         <field name="name" reporter:datatype="text"/>
2365                         <field name="xpath" reporter:datatype="text"/>
2366                         <field name="format" reporter:datatype="link"/>
2367                         <field name="first_word" reporter:datatype="bool" />
2368                 </fields>
2369                 <links/>
2370         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2371             <actions>
2372                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2373                 <retrieve/>
2374                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2375                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2376             </actions>
2377         </permacrud>
2378         </class>
2379         <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">
2380                 <fields oils_persist:primary="code" oils_persist:sequence="">
2381                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2382                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2383                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2384                 </fields>
2385                 <links/>
2386         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2387             <actions>
2388                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2389                 <retrieve/>
2390                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2391                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2392             </actions>
2393         </permacrud>
2394         </class>
2395         <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">
2396                 <fields oils_persist:primary="code" oils_persist:sequence="">
2397                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2398                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2399                 </fields>
2400                 <links/>
2401         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2402             <actions>
2403                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2404                 <retrieve/>
2405                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2406                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2407             </actions>
2408         </permacrud>
2409         </class>
2410     <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">
2411         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2412             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2413             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2414             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2415             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2416         </fields>
2417         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2418             <actions>
2419                 <retrieve/>
2420             </actions>
2421         </permacrud>
2422     </class>
2423         <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">
2424                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2425                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2426                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2427                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2428                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2429                 </fields>
2430                 <links>
2431                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2432                 </links>
2433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2434             <actions>
2435                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2436                 <retrieve/>
2437                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2438                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2439             </actions>
2440         </permacrud>
2441         </class>
2442         <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">
2443                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2444                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2445                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2446                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2447                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2448                 </fields>
2449                 <links>
2450                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2451                 </links>
2452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2453             <actions>
2454                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2455                 <retrieve/>
2456                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2457                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2458             </actions>
2459         </permacrud>
2460         </class>
2461         <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">
2462                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2463                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2464                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2465                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2466                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2467                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2468                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2469                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2470                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2471                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2472                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2473                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2474                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2475                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2476                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2477                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2478                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2479                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2480                 </fields>
2481                 <links>
2482                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2483                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2484                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2485                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2486                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2487                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2488                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2489                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2490                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2491                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2492                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2493                 </links>
2494         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2495             <actions>
2496                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2497                 <retrieve/>
2498                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2499                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2500             </actions>
2501         </permacrud>
2502         </class>
2503         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2504                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2505                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2506                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2507                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2508                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2509                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2510                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2511                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2512                 </fields>
2513                 <links>
2514                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2515                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2516         </links>
2517         </class>
2518         <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">
2519                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2520                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2521                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2522                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2523                 </fields>
2524                 <links>
2525                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2526                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2527                 </links>
2528         </class>
2529         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2530                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2531                         <field name="id" reporter:datatype="id" />
2532                         <field name="value" oils_persist:i18n="true" />
2533                 </fields>
2534                 <links/>
2535         </class>
2536         <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">
2537                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2538                         <field name="balance_owed" reporter:datatype="money" />
2539                         <field name="total_owed" reporter:datatype="money" />
2540                         <field name="total_paid" reporter:datatype="money" />
2541                         <field name="usr" reporter:datatype="link"/>
2542                 </fields>
2543                 <links>
2544                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2545         </links>
2546         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2547             <actions>
2548                 <retrieve permission="VIEW_USER">
2549                     <context link="usr" field="home_ou"/>
2550                 </retrieve>
2551             </actions>
2552         </permacrud>
2553         </class>
2554         <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">
2555                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2556                         <field name="collector" />
2557                         <field name="enter_time" reporter:datatype="timestamp"/>
2558                         <field name="id" reporter:datatype="id" />
2559                         <field name="location" reporter:datatype="link"/>
2560                         <field name="usr" reporter:datatype="link"/>
2561                 </fields>
2562                 <links>
2563                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2564                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2565                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2566                 </links>
2567         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2568             <actions>
2569                 <create permission="money.collections_tracker.create" context_field="location"/>
2570                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2571                 <delete permission="money.collections_tracker.create" context_field="location"/>
2572             </actions>
2573         </permacrud>
2574         </class>
2575         <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">
2576                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2577                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2578                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2579                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2580                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2581                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2582                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2583                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2584                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2585                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2586                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2587                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2588                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2589                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2590                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2591                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2592                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2593                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2594                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2595                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2596                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2597                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2598                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2599                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2600                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2601                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2602                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2603                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2604                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2605                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2606                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2607                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2608                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2609                 </fields>
2610                 <links>
2611                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2612                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2613                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2614                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2615                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2616                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2617                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2618                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2619                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
2620                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
2621                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
2622                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
2623                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
2624                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
2625                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
2626                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
2627                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
2628                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
2629                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
2630                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
2631                 </links>
2632         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2633             <actions>
2634                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2635                 <retrieve/>
2636                 <update permission="UPDATE_MARC" global_required="true"/>
2637             </actions>
2638         </permacrud>
2639         </class>
2640         <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">
2641                 <fields oils_persist:primary="id">
2642                         <field name="dow_0_close" />
2643                         <field name="dow_0_open" />
2644                         <field name="dow_1_close" />
2645                         <field name="dow_1_open" />
2646                         <field name="dow_2_close" />
2647                         <field name="dow_2_open" />
2648                         <field name="dow_3_close" />
2649                         <field name="dow_3_open" />
2650                         <field name="dow_4_close" />
2651                         <field name="dow_4_open" />
2652                         <field name="dow_5_close" />
2653                         <field name="dow_5_open" />
2654                         <field name="dow_6_close" />
2655                         <field name="dow_6_open" />
2656                         <field name="id" reporter:datatype="id" />
2657                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
2658                 </fields>
2659                 <links>
2660                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
2661                 </links>
2662         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2663             <actions>
2664                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
2665                 <retrieve/>
2666                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
2667                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
2668             </actions>
2669         </permacrud>
2670         </class>
2671         <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">
2672                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
2673                         <field name="id" reporter:datatype="id" />
2674                         <field name="record" reporter:datatype="link"/>
2675                         <field name="label" reporter:datatype="text"/>
2676                         <field name="label_sortkey" reporter:datatype="text"/>
2677                 </fields>
2678                 <links>
2679                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2680                 </links>
2681         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2682             <actions>
2683                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
2684                 <retrieve/>
2685                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
2686                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
2687             </actions>
2688         </permacrud>
2689         </class>
2690         <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">
2691                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
2692                         <field name="id" reporter:datatype="id" />
2693                         <field name="target_copy" reporter:datatype="link" />
2694                         <field name="part" reporter:datatype="link"/>
2695                 </fields>
2696                 <links>
2697                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2698                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
2699                 </links>
2700         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2701             <actions>
2702                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
2703                 <retrieve/>
2704                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
2705                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
2706             </actions>
2707         </permacrud>
2708         </class>
2709         <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">
2710                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
2711                         <field name="close_end" reporter:datatype="timestamp" />
2712                         <field name="close_start" reporter:datatype="timestamp" />
2713                         <field name="id" reporter:datatype="id" />
2714                         <field name="org_unit" reporter:datatype="org_unit"/>
2715                         <field name="reason" reporter:datatype="text"/>
2716                 </fields>
2717                 <links>
2718                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2719                 </links>
2720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2721             <actions>
2722                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2723                 <retrieve/>
2724                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2725                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
2726             </actions>
2727         </permacrud>
2728         </class>
2729         <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">
2730                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
2731                         <field name="extended" reporter:datatype="interval"/>
2732                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
2733                         <field name="max_renewals" reporter:datatype="int" />
2734                         <field name="name" reporter:datatype="text"/>
2735                         <field name="normal" reporter:datatype="interval"/>
2736                         <field name="shrt" reporter:datatype="interval"/>
2737                 </fields>
2738                 <links>
2739                 </links>
2740         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2741             <actions>
2742                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2743                 <retrieve/>
2744                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2745                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2746             </actions>
2747         </permacrud>
2748         </class>
2749
2750         <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">
2751                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
2752                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2753                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2754             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
2755                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2756             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
2757                 </fields>
2758                 <links>
2759             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2760                 </links>
2761                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2762             <actions>
2763                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2764                 <retrieve/>
2765                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2766                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2767             </actions>
2768                 </permacrud>
2769         </class>
2770
2771         <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">
2772                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
2773                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2774                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
2775                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
2776             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
2777                 </fields>
2778                 <links>
2779                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
2780                 </links>
2781                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
2784                 <retrieve/>
2785                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
2786                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
2787             </actions>
2788                 </permacrud>
2789         </class>
2790
2791         <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">
2792                 <fields oils_persist:primary="id" oils_persist:sequence="">
2793                         <field name="balance_owed" reporter:datatype="money"/>
2794                         <field name="id" reporter:datatype="id" />
2795                         <field name="last_billing_note" reporter:datatype="text"/>
2796                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
2797                         <field name="last_billing_type" reporter:datatype="text"/>
2798                         <field name="last_payment_note" reporter:datatype="text"/>
2799                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
2800                         <field name="last_payment_type" reporter:datatype="text"/>
2801                         <field name="total_owed" reporter:datatype="money"/>
2802                         <field name="total_paid" reporter:datatype="money"/>
2803                         <field name="usr" reporter:datatype="link"/>
2804                         <field name="xact_finish" reporter:datatype="timestamp" />
2805                         <field name="xact_start" reporter:datatype="timestamp" />
2806                         <field name="xact_type" reporter:datatype="text"/>
2807                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
2808                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
2809                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
2810                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
2811                         <field name="billing_location" reporter:datatype="link"/>
2812                 </fields>
2813                 <links>
2814                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2815                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
2816                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
2817                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
2818                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
2819                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2820                 </links>
2821         </class>
2822         <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">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
2824                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
2825                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
2826                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
2827                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
2828                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
2829                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
2830                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
2831                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2832                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
2833                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
2834                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
2835                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2836                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
2837                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
2838                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
2839                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
2840                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
2841                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
2842                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2843                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
2844                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
2845                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
2846                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
2847                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
2848                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
2849                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
2850                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
2851                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
2852                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
2853                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
2854                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
2855                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
2856                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
2857                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
2858                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
2859                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
2860                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
2861                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
2862                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
2863                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
2864                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
2865                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
2866                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
2867                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
2868                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
2869                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
2870                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
2871                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
2872                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
2873                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
2874                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
2875                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
2876                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2877                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2878                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
2879                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
2880                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2881                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
2882                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
2883                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
2884                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
2885                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
2886                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
2887                 </fields>
2888                 <links>
2889                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
2890                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
2891                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
2892                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
2893                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
2894                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
2895                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
2896                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
2897                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
2898                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
2899                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
2900                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
2901                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
2902                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
2903                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="circ"/>
2904                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
2905                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
2906                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
2907                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
2908                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
2909                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
2910                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
2911                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
2912                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
2913                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
2914                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
2915                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
2916                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
2917                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
2918                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
2919                 </links>
2920                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2921                         <actions>
2922                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
2923                         </actions>
2924                 </permacrud>
2925         </class>
2926         <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">
2927                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
2928                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2929                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
2930                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
2931                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
2932                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
2933                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
2934                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
2935                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
2936         </fields>
2937                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2938                         <actions>
2939                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2940                                 <retrieve/>
2941                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2942                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
2943                         </actions>
2944                 </permacrud>
2945         </class>
2946         <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">
2947                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
2948                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2949                         <field name="usr" reporter:label="User" reporter:datatype="link" />
2950                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
2951                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
2952         </fields>
2953         <links>
2954                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2955                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
2956                 </links>
2957                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2958                         <actions>
2959                                 <retrieve permission="RUN_REPORTS">
2960                                         <context link="usr" field="home_ou" />
2961                                 </retrieve>
2962                         </actions>
2963                 </permacrud>
2964         </class>
2965         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
2966                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
2967                         <field name="id" reporter:label="ID" reporter:datatype="id" />
2968                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
2969                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
2970                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
2971                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
2972                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
2973         </fields>
2974         <links>
2975                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
2976                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
2977                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
2978                 </links>
2979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2980                         <actions>
2981                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
2982                                         <context link="usr" field="home_ou" />
2983                                         <context link="ws" field="owning_lib" />
2984                                 </retrieve>
2985                                 <create permission="ADMIN_TOOLBAR" context_field="org">
2986                                         <context link="usr" field="home_ou" />
2987                                         <context link="ws" field="owning_lib" />
2988                                 </create>
2989                                 <update permission="ADMIN_TOOLBAR" context_field="org">
2990                                         <context link="usr" field="home_ou" />
2991                                         <context link="ws" field="owning_lib" />
2992                                 </update>
2993                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
2994                                         <context link="usr" field="home_ou" />
2995                                         <context link="ws" field="owning_lib" />
2996                                 </delete>
2997                         </actions>
2998                 </permacrud>
2999         </class>
3000         <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">
3001                 <fields oils_persist:primary="name">
3002                         <field name="name" reporter:datatype="text"/>
3003                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3004                 </fields>
3005                 <links/>
3006                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3007                         <actions>
3008                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3009                                 <retrieve/>
3010                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3011                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3012                         </actions>
3013                 </permacrud>
3014         </class>
3015         <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">
3016                 <fields oils_persist:primary="name">
3017                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3018                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3019                         <field name="description" reporter:label="Description" reporter:datatype="text"/>
3020                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3021                         <field name="fm_class" reporter:label="Fielmapper Class" reporter:datatype="text"/>
3022                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3023                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3024                 </fields>
3025                 <links>
3026                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3027                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3028                 </links>
3029                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3030                         <actions>
3031                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3032                                 <retrieve/>
3033                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3034                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3035                         </actions>
3036                 </permacrud>
3037         </class>
3038         <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">
3039                 <fields oils_persist:primary="name">
3040                         <field name="name" reporter:datatype="text"/>
3041                         <field name="label" reporter:datatype="text"/>
3042                         <field name="description" reporter:datatype="text"/>
3043                         <field name="datatype" reporter:datatype="text"/>
3044                         <field name="view_perm" reporter:datatype="link"/>
3045                         <field name="update_perm" reporter:datatype="link"/>
3046                         <field name="fm_class" reporter:datatype="text"/>
3047                         <field name="grp" reporter:datatype="link"/>
3048                 </fields>
3049                 <links>
3050                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3051                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3052                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3053                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3054                 </links>
3055                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3056                         <actions>
3057                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3058                                 <retrieve/>
3059                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3060                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3061                         </actions>
3062                 </permacrud>
3063         </class>
3064         <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">
3065                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3066                         <field name="id" />
3067                         <field name="name"  reporter:datatype="text"/>
3068                         <field name="org_unit" reporter:datatype="org_unit"/>
3069                         <field name="value"  reporter:datatype="text"/>
3070                 </fields>
3071                 <links>
3072                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3073                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3074                 </links>
3075         </class>
3076         <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">
3077                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3078                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3079                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3080                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3081                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3082                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3083                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3084                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3085                 </fields>
3086                 <links>
3087                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3088                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3089                 </links>
3090         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3091             <actions>
3092                 <create permission="CREATE_COPY_NOTE">
3093                     <context link="owning_copy" field="circ_lib"/>
3094                 </create>
3095                 <retrieve permission="VIEW_COPY_NOTES">
3096                     <context link="owning_copy" field="circ_lib"/>
3097                 </retrieve>
3098                 <update permission="UPDATE_COPY_NOTE">
3099                     <context link="owning_copy" field="circ_lib"/>
3100                 </update>
3101                 <delete permission="DELETE_COPY_NOTE">
3102                     <context link="owning_copy" field="circ_lib"/>
3103                 </delete>
3104             </actions>
3105         </permacrud>
3106         </class>
3107         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3108                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3109                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3110                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3111                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3112                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3113                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3114                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3115                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3116                 </fields>
3117                 <links>
3118                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3119                 </links>
3120         </class>
3121         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3122                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3123                         <field name="fingerprint"  reporter:datatype="text"/>
3124                         <field name="id" reporter:datatype="id" />
3125                         <field name="master_record" reporter:datatype="link"/>
3126                         <field name="mods"  reporter:datatype="text"/>
3127                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3128                 </fields>
3129                 <links>
3130                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3131                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3132                 </links>
3133         </class>
3134         <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">
3135                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3136                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3137                         <field name="name"  reporter:datatype="text"/>
3138                 </fields>
3139                 <links/>
3140         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3141             <actions>
3142                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3143                 <retrieve/>
3144                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3145                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3146             </actions>
3147         </permacrud>
3148         </class>
3149         <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">
3150                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3151                         <field name="code"  reporter:datatype="text"/>
3152                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3153                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3154                 </fields>
3155                 <links/>
3156         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3157             <actions>
3158                 <create permission="CREATE_PERM" global_required="true"/>
3159                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3160                 <update permission="UPDATE_PERM" global_required="true"/>
3161                 <delete permission="DELETE_PERM" global_required="true"/>
3162             </actions>
3163         </permacrud>
3164         </class>
3165         <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">
3166                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3167                         <field name="id" reporter:datatype="id" />
3168                         <field name="metarecord" reporter:datatype="link"/>
3169                         <field name="source" reporter:datatype="link"/>
3170                 </fields>
3171                 <links>
3172                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3173                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3174                 </links>
3175         </class>
3176         <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">
3177                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3178                         <field name="id" reporter:datatype="id" />
3179                         <field name="field" reporter:datatype="link"/>
3180                         <field name="source" reporter:datatype="link"/>
3181                         <field name="value"  reporter:datatype="text"/>
3182                 </fields>
3183                 <links>
3184                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3185                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3186                 </links>
3187         </class>
3188         <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">
3189                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3190                         <field name="id" reporter:datatype="id" />
3191                         <field name="value" reporter:datatype="text"/>
3192                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3193                 </fields>
3194                 <links>
3195                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3196                 </links>
3197         </class>
3198         <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">
3199                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3200                         <field name="id" reporter:datatype="id" />
3201                         <field name="entry" reporter:datatype="link"/>
3202                         <field name="def" reporter:datatype="link"/>
3203                         <field name="source" reporter:datatype="link"/>
3204                 </fields>
3205                 <links>
3206                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3207                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3208                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3209                 </links>
3210         </class>
3211         <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">
3212                 <oils_persist:source_definition>
3213                         SELECT * FROM metabib.author_field_entry
3214                                                 UNION ALL
3215                         SELECT * FROM metabib.keyword_field_entry
3216                                                 UNION ALL
3217                         SELECT * FROM metabib.identifier_field_entry
3218                                                 UNION ALL
3219                         SELECT * FROM metabib.title_field_entry
3220                                                 UNION ALL
3221                         SELECT * FROM metabib.subject_field_entry
3222                                                 UNION ALL
3223                         SELECT * FROM metabib.series_field_entry
3224                 </oils_persist:source_definition>
3225                 <fields>
3226                         <field name="field" reporter:datatype="link"/>
3227                         <field name="id" reporter:datatype="id" />
3228                         <field name="source" reporter:datatype="link"/>
3229                         <field name="value"  reporter:datatype="text"/>
3230                 </fields>
3231                 <links>
3232                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3233                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3234                 </links>
3235         </class>
3236         <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">
3237                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3238                         <field name="field" reporter:datatype="link"/>
3239                         <field name="id" reporter:datatype="id" />
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="mcp" controller="open-ils.cstore" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3249                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3250                         <field name="accepting_usr" reporter:datatype="link"/>
3251                         <field name="amount" reporter:datatype="money" />
3252                         <field name="amount_collected" reporter:datatype="money" />
3253                         <field name="cash_drawer" reporter:datatype="link"/>
3254                         <field name="id" reporter:datatype="id" />
3255                         <field name="note"  reporter:datatype="text"/>
3256                         <field name="payment_ts" reporter:datatype="timestamp"/>
3257                         <field name="xact" reporter:datatype="link"/>
3258                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3259                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3260                 </fields>
3261                 <links>
3262                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3263                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3264                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3265                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3266                 </links>
3267         </class>
3268         <class id="mfp" controller="open-ils.cstore" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3269                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3270                         <field name="accepting_usr" reporter:datatype="link"/>
3271                         <field name="amount" reporter:datatype="money" />
3272                         <field name="amount_collected" reporter:datatype="money" />
3273                         <field name="id" reporter:datatype="id" />
3274                         <field name="note"  reporter:datatype="text"/>
3275                         <field name="payment_ts" reporter:datatype="timestamp"/>
3276                         <field name="xact" reporter:datatype="link"/>
3277                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3278                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3279                 </fields>
3280                 <links>
3281                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3282                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3283                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3284                 </links>
3285         </class>
3286         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3287                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3288                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3289                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3290                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3291                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3292                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3293                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3294                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3295                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3296                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3297                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3298                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3299                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3300                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3301                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3302                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3303                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3304                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3305                 </fields>
3306                 <links>
3307                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3308                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3309                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3310                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3311                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3312                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3313                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3314                 </links>
3315         </class>
3316
3317         <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">
3318                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3319                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3320                         <field name="name"  reporter:datatype="text"/>
3321                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3322                         <field name="block_list" reporter:datatype="text"/>
3323                         <field name="staff_alert" reporter:datatype="bool"/>
3324                         <field name="org_depth" reporter:datatype="int"/>
3325                 </fields>
3326                 <links/>
3327         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3328             <actions>
3329                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3330                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3331                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3332                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3333             </actions>
3334         </permacrud>
3335         </class>
3336         <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">
3337                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3338                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3339                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3340                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3341                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3342                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3343                 </fields>
3344                 <links>
3345                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3346                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3347                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3348         </links>
3349         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3350             <actions>
3351                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3352                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3353                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3354                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3355             </actions>
3356         </permacrud>
3357         </class>
3358         <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">
3359                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3360                         <field name="holdable" reporter:datatype="bool"/>
3361                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3362                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3363                         <field name="opac_visible" reporter:datatype="bool"/>
3364             <field name="copy_active" reporter:datatype="bool"/>
3365             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3366                 </fields>
3367                 <links/>
3368         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3369             <actions>
3370                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3371                 <retrieve/>
3372                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3373                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3374             </actions>
3375         </permacrud>
3376         </class>
3377         <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">
3378                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3379                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3380                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3381                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3382                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3383                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3384                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3385                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3386                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3387                 </fields>
3388                 <links>
3389                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3390                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3391                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3392                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3393                 </links>
3394                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3395                         <actions>
3396                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3397                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3398                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3399                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3400                         </actions>
3401                 </permacrud>
3402         </class>
3403         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3404                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3405                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3406                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3407                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3408                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3409                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3410                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3411                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3412                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3413                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3414                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3415                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3416                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3417                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3418                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3419                 </fields>
3420                 <links>
3421                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3422                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3423                 </links>
3424         </class>
3425         <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">
3426                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3427                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3428                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3429                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3430                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3431                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3432                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3433                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3434                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3435                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3436                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3437                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3438                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3439                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3440                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3441                 </fields>
3442                 <links>
3443                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3444                 </links>
3445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3446                         <actions>
3447                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3448                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3449                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3450                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3451                         </actions>
3452                 </permacrud>
3453         </class>
3454
3455
3456         <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">
3457                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3458                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3459                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3460                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3461                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3462                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3463                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3464                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3465                 </fields>
3466                 <links>
3467                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3468                 </links>
3469         </class>
3470
3471         <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">
3472                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3473                         <field name="call_number" />
3474                         <field name="create_date" reporter:datatype="timestamp"/>
3475                         <field name="creator" reporter:datatype="link"/>
3476                         <field name="id" reporter:datatype="id" />
3477                         <field name="pub" reporter:datatype="bool"/>
3478                         <field name="title"  reporter:datatype="text"/>
3479                         <field name="value"  reporter:datatype="text"/>
3480                 </fields>
3481                 <links>
3482                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3483                 </links>
3484         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3485             <actions>
3486                 <create permission="CREATE_VOLUME_NOTE">
3487                     <context link="call_number" field="owning_lib"/>
3488                 </create>
3489                 <retrieve permission="VIEW_VOLUME_NOTES">
3490                     <context link="call_number" field="owning_lib"/>
3491                 </retrieve>
3492                 <update permission="UPDATE_VOLUME_NOTE">
3493                     <context link="call_number" field="owning_lib"/>
3494                 </update>
3495                 <delete permission="DELETE_VOLUME_NOTE">
3496                     <context link="call_number" field="owning_lib"/>
3497                 </delete>
3498             </actions>
3499         </permacrud>
3500         </class>
3501         <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">
3502                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3503                         <field name="create_date" reporter:datatype="timestamp"/>
3504                         <field name="creator" reporter:datatype="link"/>
3505                         <field name="edit_date" reporter:datatype="timestamp"/>
3506                         <field name="editor" reporter:datatype="link"/>
3507                         <field name="id" reporter:datatype="id" />
3508                         <field name="record" reporter:datatype="link"/>
3509                         <field name="value" reporter:datatype="text"/>
3510                 </fields>
3511                 <links>
3512                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3513                 </links>
3514         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3515             <actions>
3516                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3517                 <retrieve/>
3518                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3519                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3520             </actions>
3521         </permacrud>
3522         </class>
3523         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3524         <oils_persist:source_definition>
3525 SELECT  usr,
3526         SUM(
3527             CASE
3528                 WHEN (
3529                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3530                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3531                 ) THEN 1
3532                 ELSE 0
3533             END
3534         ) AS out,
3535
3536         SUM(
3537             CASE
3538                 WHEN (
3539                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3540                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3541                 ) THEN 1
3542                 ELSE 0
3543             END
3544         ) AS overdue,
3545
3546         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3547         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN 1 ELSE 0 END) AS claims_returned,
3548         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3549   FROM  action.circulation
3550   WHERE checkin_time IS NULL
3551   GROUP BY 1
3552         </oils_persist:source_definition>
3553         <fields oils_persist:primary="usr">
3554             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3555             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3556             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3557             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3558             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3559             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3560         </fields>
3561         <links>
3562             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3563         </links>
3564         </class>
3565         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
3566         <oils_persist:source_definition>
3567 SELECT  usr,
3568         ARRAY_TO_STRING(ARRAY_ACCUM(
3569             CASE
3570                 WHEN (
3571                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3572                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3573                 ) THEN id
3574                 ELSE 0
3575             END
3576         ),',') AS out,
3577
3578         ARRAY_TO_STRING(ARRAY_ACCUM(
3579             CASE
3580                 WHEN (
3581                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3582                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3583                 ) THEN id
3584                 ELSE 0
3585             END
3586         ),',') AS overdue,
3587
3588         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id ELSE 0 END),',') AS lost,
3589         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'CLAIMSRETURNED') THEN id ELSE 0 END),',') AS claims_returned,
3590         ARRAY_TO_STRING(ARRAY_ACCUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id ELSE 0 END),',') AS long_overdue
3591   FROM  action.circulation
3592   WHERE checkin_time IS NULL
3593   GROUP BY 1
3594         </oils_persist:source_definition>
3595         <fields oils_persist:primary="usr">
3596             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3597             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3598             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3599             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3600             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3601             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3602         </fields>
3603         <links>
3604             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3605         </links>
3606         </class>
3607         <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">
3608                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3609                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3610                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3611                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3612                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3613                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3614                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3615                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3616                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3617                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3618                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3619                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3620                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3621                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3622                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3623                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3624                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3625                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3626                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3627                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3628                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3629                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3630                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3631                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
3632                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3633                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3634                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3635                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3636                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3637                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3638                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3639                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3640                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3641                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3642                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3643                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3644                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3645                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3646                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3647                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3648                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3649                 </fields>
3650                 <links>
3651                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3652                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3653                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3654                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3655                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3656                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3657                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3658                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3659                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3660                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3661                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3662                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3663                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3664                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3665                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3666                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3667                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3668                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
3669                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3670                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3671                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3672                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3673                 </links>
3674                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3675                         <actions>
3676                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
3677                         </actions>
3678                 </permacrud>
3679         </class>
3680         <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">
3681                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3682                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3683                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3684                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3685                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3686                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3687                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3688                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3689                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3690                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3691                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3692                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3693                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3694                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3695                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3696                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3697                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3698                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3699                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3700                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3701                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3702                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3703                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3704                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3705                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3706                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3707                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3708                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3709                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3710                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3711                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3712                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3713                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3714                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3715                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3716                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3717                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3718                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3719                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3720                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3721                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3722                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3723                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3724                 </fields>
3725                 <links>
3726                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3727                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3728                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3729                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3730                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3731                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3732                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3733                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3734                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3735                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3736                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3737                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3738                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3739                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3740                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3741                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3742                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3743                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3744                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3745                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3746                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3747                 </links>
3748         </class>
3749         <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">
3750                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3751                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
3752                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
3753                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
3754                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
3755                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
3756                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
3757                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
3758                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
3759                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
3760                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3761                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
3762                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
3763                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
3764                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
3765                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
3766                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
3767                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
3768                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
3769                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
3770                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
3771                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
3772                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
3773                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
3774                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
3775                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
3776                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
3777                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
3778                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
3779                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
3780                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
3781                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3782                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3783                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
3784                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
3785                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3786                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3787                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
3788                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
3789                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
3790                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
3791                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
3792                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
3793                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
3794                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
3795                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3796                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3797                 </fields>
3798                 <links>
3799                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
3800                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
3801                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
3802                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3803                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
3804                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3805                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
3806                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
3807                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
3808                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
3809                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
3810                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
3811                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
3812                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
3813                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
3814                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
3815                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
3816                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
3817                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
3818                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
3819                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
3820                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
3821                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
3822                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
3823                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
3824                 </links>
3825         </class>
3826
3827         <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">
3828                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
3829                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3830                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
3831                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3832                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3833                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3834                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3835                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
3836                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
3837                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
3838                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
3839                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
3840                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
3841                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
3842                 </fields>
3843                 <links>
3844                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3845                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3846                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
3847                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
3848                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
3849                 </links>
3850                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3851                         <actions>
3852                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3853                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3854                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3855                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
3856                         </actions>
3857                 </permacrud>
3858         </class>
3859
3860         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
3861                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
3862                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
3863                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3864                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
3865                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
3866                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
3867                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
3868                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
3869                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
3870                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3871                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3872                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
3873                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
3874                 </fields>
3875                 <links>
3876                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3877                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
3878                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
3879                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
3880                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
3881                 </links>
3882                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3883                         <actions>
3884                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3885                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3886                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3887                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
3888                         </actions>
3889                 </permacrud>
3890         </class>
3891         
3892         <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">
3893                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
3894                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
3895                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3896                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
3897                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
3898                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
3899                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
3900                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3901                 </fields>
3902                 <links>
3903                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3904                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
3905                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
3906                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
3907                 </links>
3908                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3909                         <actions>
3910                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3911                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3912                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3913                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
3914                         </actions>
3915                 </permacrud>
3916         </class>
3917         
3918         <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">
3919                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
3920                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
3921                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
3922                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
3923                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
3924                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3925                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3926                 </fields>
3927                 <links>
3928                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3929                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
3930                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
3931                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
3932                 </links>
3933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3934                         <actions>
3935                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3936                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3937                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3938                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
3939                         </actions>
3940                 </permacrud>
3941         </class>
3942         
3943         <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">
3944                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
3945                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
3946                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
3947                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
3948                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
3949                 </fields>
3950                 <links>
3951                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
3952                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
3953                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
3954                 </links>
3955                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3956                         <actions>
3957                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3958                     <context link="resource" field="owner" />
3959                 </create>
3960                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3961                     <context link="resource" field="owner" />
3962                 </retrieve>
3963                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3964                     <context link="resource" field="owner" />
3965                 </update>
3966                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
3967                     <context link="resource" field="owner" />
3968                 </delete>
3969                         </actions>
3970                 </permacrud>
3971         </class>
3972         
3973         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
3974                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
3975                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
3976                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3977                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
3978                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
3979                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
3980                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
3981                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
3982                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
3983                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
3984                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
3985                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
3986                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
3987                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
3988                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
3989                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
3990                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
3991                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
3992                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
3993                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
3994                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
3995                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
3996                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
3997                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
3998                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
3999                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4000                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4001                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4002                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4003                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4004                 </fields>
4005                 <links>
4006                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4007                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4008                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4009                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4010                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4011                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4012                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4013                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4014                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4015                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4016                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4017                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4018                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4019                 </links>
4020                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4021                         <actions>
4022                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4023                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4024                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4025                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4026                         </actions>
4027                 </permacrud>
4028         </class>
4029         
4030         <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">
4031                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4032                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4033                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4034                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4035                 </fields>
4036                 <links>
4037                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4038                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4039                 </links>
4040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4041                         <actions>
4042                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4043                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4044                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4045                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4046                         </actions>
4047                 </permacrud>
4048         </class>
4049
4050         <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">
4051                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4052                         <field name="bucket" reporter:datatype="link"/>
4053                         <field name="id" reporter:datatype="id" />
4054                         <field name="target_call_number" reporter:datatype="link" />
4055                         <field name="create_time" reporter:datatype="timestamp" />
4056                         <field name="pos" reporter:datatype="int" />
4057                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4058                 </fields>
4059                 <links>
4060                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4061                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4062             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4063                 </links>
4064         </class>
4065         <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">
4066                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4067                         <field name="id" reporter:datatype="id" />
4068                         <field name="item" reporter:datatype="link"/>
4069                         <field name="note" reporter:datatype="text" />
4070                 </fields>
4071                 <links>
4072                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4073                 </links>
4074         </class>
4075         <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">
4076                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4077                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4078                         <field name="btype" reporter:datatype="text"/>
4079                         <field name="id" reporter:datatype="id" />
4080                         <field name="name" reporter:datatype="text"/>
4081                         <field name="description" reporter:datatype="text"/>
4082                         <field name="owner" reporter:datatype="link"/>
4083                         <field name="pub" reporter:datatype="bool"/>
4084                         <field name="create_time" reporter:datatype="timestamp" />
4085                 </fields>
4086                 <links>
4087                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4088                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4089                 </links>
4090         </class>
4091         <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">
4092                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4093                         <field name="id" reporter:datatype="id" />
4094                         <field name="bucket" reporter:datatype="link"/>
4095                         <field name="note" reporter:datatype="text" />
4096                 </fields>
4097                 <links>
4098                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4099                 </links>
4100         </class>
4101         <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">
4102                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4103                         <field name="hold" reporter:datatype="link"/>
4104                         <field name="id" reporter:datatype="id" />
4105                         <field name="target_copy" reporter:datatype="link"/>
4106                 </fields>
4107                 <links>
4108                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4109                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4110                 </links>
4111         </class>
4112         <class id="ahn" controller="open-ils.cstore" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4113                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4114                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4115                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4116                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4117                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4118                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4119                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4120                 </fields>
4121                 <links>
4122                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4123                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4124                 </links>
4125         </class>
4126         <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">
4127                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4128                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4129                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4130                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4131                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4132                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4133                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4134                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4135                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4136                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4137                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4138                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4139                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4140                 </fields>
4141                 <links>
4142                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4143                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4144                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4145                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4146                 </links>
4147         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4148             <actions>
4149                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4150                 <retrieve/>
4151                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4152                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4153             </actions>
4154         </permacrud>
4155         </class>
4156         <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">
4157                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4158                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4159                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4160                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4161                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4162             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4163             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4164             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4165                 </fields>
4166                 <links>
4167                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4168                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4169                 </links>
4170         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4171             <actions>
4172                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4173                 <retrieve/>
4174                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4175                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4176             </actions>
4177         </permacrud>
4178         </class>
4179         <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">
4180                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4181                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4182             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4183             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4184                 </fields>
4185                 <links>
4186                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4187                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4188                 </links>
4189         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4190             <actions>
4191                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4192                                         <context link="lgroup" field="owner" />
4193                 </create>
4194                 <retrieve/>
4195                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4196                                         <context link="lgroup" field="owner" />
4197                 </update>
4198                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4199                                         <context link="lgroup" field="owner" />
4200                 </delete>
4201             </actions>
4202         </permacrud>
4203         </class>
4204
4205     <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">
4206         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4207             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4208             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4209             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4210             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4211         </fields>
4212         <links>
4213             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4214             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4215         </links>
4216         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4217             <actions>
4218                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4219                 <retrieve/>
4220                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4221                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4222             </actions>
4223         </permacrud>
4224     </class>
4225
4226         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4227                 <fields>
4228                         <field name="sre_id" oils_persist:virtual="true" />
4229                         <field name="location" oils_persist:virtual="true" />
4230                         <field name="owning_lib" oils_persist:virtual="true" />
4231                         <field name="basic_holdings" oils_persist:virtual="true" />
4232                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4233                         <field name="supplement_holdings" oils_persist:virtual="true" />
4234                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4235                         <field name="index_holdings" oils_persist:virtual="true" />
4236                         <field name="index_holdings_add" oils_persist:virtual="true" />
4237                         <field name="online" oils_persist:virtual="true" />
4238                         <field name="missing" oils_persist:virtual="true" />
4239                         <field name="incomplete" oils_persist:virtual="true" />
4240                 </fields>
4241         </class>
4242
4243         <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">
4244                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4245                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4246                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4247                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4248                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4249                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4250                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4251                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4252                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4253                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4254                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4255                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4256                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4257                 </fields>
4258                 <links>
4259                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4260                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4261                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4262                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4263                 </links>
4264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4265                         <actions>
4266                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4267                                 <retrieve/>
4268                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4269                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4270                         </actions>
4271                 </permacrud>
4272         </class>
4273
4274         <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">
4275                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4276                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4277                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4278                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4279                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4280                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4281                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4282                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4283                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4284                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4285                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4286                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4287                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4288                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4289                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4290                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4291                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4292                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4293                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4294                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4295                 </fields>
4296                 <links>
4297                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4298                 </links>
4299                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4300                         <actions>
4301                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4302                                         <context link="subscription" field="owning_lib" />
4303                                 </create>
4304                                 <retrieve />
4305                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4306                                         <context link="subscription" field="owning_lib" />
4307                                 </update>
4308                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4309                                         <context link="subscription" field="owning_lib" />
4310                                 </delete>
4311                         </actions>
4312                 </permacrud>
4313         </class>
4314
4315         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4316                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4317                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4318                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4319                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4320                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4321                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4322                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4323                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4324                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4325                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4326                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4327                 </fields>
4328                 <links>
4329                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4330                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4331                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4332                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4333                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4334                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4335                 </links>
4336                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4337                         <actions>
4338                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4339                                 <retrieve />
4340                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4341                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4342                         </actions>
4343                 </permacrud>
4344         </class>
4345
4346         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4347                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4348                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4349                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4350                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4351                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4352                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4353                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4354                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4355                 </fields>
4356                 <links>
4357                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4358                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4359                 </links>
4360         </class>
4361
4362         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4363                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4364                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4365                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4366                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4367                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4368                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4369                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4370                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4371                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4372                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4373                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4374                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4375                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4376                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4377                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4378                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4379                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4380                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4381                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4382                 </fields>
4383                 <links>
4384                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4385                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4386                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4387                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4388                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4389                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4390                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4391                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4392                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4393                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4394                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4395                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4396                 </links>
4397                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4398                         <actions>
4399                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4400                                 <retrieve />
4401                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4402                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4403                         </actions>
4404                 </permacrud>
4405         </class>
4406
4407         <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">
4408                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4409                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4410                         <field reporter:label="Distribution" name="distribution" 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="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4419                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4420                 </links>
4421                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4422                         <actions>
4423                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4424                                         <context link="distribution" field="holding_lib" />
4425                                 </create>
4426                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4427                                         <context link="distribution" field="holding_lib" />
4428                                 </retrieve>
4429                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4430                                         <context link="distribution" field="holding_lib" />
4431                                 </update>
4432                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4433                                         <context link="distribution" field="holding_lib" />
4434                                 </delete>
4435                         </actions>
4436                 </permacrud>
4437         </class>
4438
4439         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4440                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4441                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4442                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4443                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4444                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4445                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4446                 </fields>
4447                 <links>
4448                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4449                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4450                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4451                 </links>
4452                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4453                         <actions>
4454                                 <create permission="ADMIN_SERIAL_STREAM">
4455                                         <context link="distribution" field="holding_lib" />
4456                                 </create>
4457                                 <retrieve />
4458                                 <update permission="ADMIN_SERIAL_STREAM">
4459                                         <context link="distribution" field="holding_lib" />
4460                                 </update>
4461                                 <delete permission="ADMIN_SERIAL_STREAM">
4462                                         <context link="distribution" field="holding_lib" />
4463                                 </delete>
4464                         </actions>
4465                 </permacrud>
4466         </class>
4467
4468         <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">
4469                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4470                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4471                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4472                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4473                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4474                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4475                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4476                 </fields>
4477                 <links>
4478                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4479                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4480                 </links>
4481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4482                         <actions>
4483                                 <create permission="ADMIN_SERIAL_STREAM">
4484                                         <context link="stream" jump="distribution" field="holding_lib" />
4485                                 </create>
4486                                 <retrieve permission="RECEIVE_SERIAL">
4487                                         <context link="stream" jump="distribution" field="holding_lib" />
4488                                 </retrieve>
4489                                 <update permission="ADMIN_SERIAL_STREAM">
4490                                         <context link="stream" jump="distribution" field="holding_lib" />
4491                                 </update>
4492                                 <delete permission="ADMIN_SERIAL_STREAM">
4493                                         <context link="stream" jump="distribution" field="holding_lib" />
4494                                 </delete>
4495                         </actions>
4496                 </permacrud>
4497         </class>
4498
4499         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4500                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4501                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4502                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4503                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4504                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4505                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4506                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4507                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4508                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4509                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4510                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4511                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4512                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4513                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4514                 </fields>
4515                 <links>
4516                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4517                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4518                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4519                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4520                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4521                 </links>
4522                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4523                         <actions>
4524                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4525                                         <context link="subscription" field="owning_lib" />
4526                                 </create>
4527                                 <retrieve/>
4528                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4529                                         <context link="subscription" field="owning_lib" />
4530                                 </update>
4531                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4532                                         <context link="subscription" field="owning_lib" />
4533                                 </delete>
4534                         </actions>
4535                 </permacrud>
4536         </class>
4537
4538         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4539                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4540                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4541                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4542                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
4543                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4544                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
4545                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
4546                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4547                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
4548                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
4549                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
4550                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
4551                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
4552                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
4553                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4554                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
4555                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4556                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
4557                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
4558                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
4559                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
4560                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
4561                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
4562                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
4563                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
4564                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
4565                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
4566                         <field reporter:label="Price" name="price" reporter:datatype="money" />
4567                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
4568                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
4569                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
4570                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
4571                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
4572                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
4573                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
4574                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
4575                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
4576                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4577                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4578                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
4579                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
4580                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
4581                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4582                 </fields>
4583                 <links>
4584                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
4585                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
4586                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4587                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4588                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4589                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
4590                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4591                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
4592                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
4593                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
4594                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
4595                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
4596                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
4597                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
4598                 </links>
4599                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4600                         <actions>
4601                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4602                                 <retrieve/>
4603                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4604                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
4605                         </actions>
4606                 </permacrud>
4607         </class>
4608
4609         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
4610                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
4611                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4612                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4613                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4614                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4615                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4616                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
4617                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4618                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
4619                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
4620                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
4621                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
4622                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
4623                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4624                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
4625                 </fields>
4626                 <links>
4627                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4628                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4629                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4630                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4631                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
4632                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
4633                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
4634                 </links>
4635                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4636                         <actions>
4637                                 <create permission="ADMIN_SERIAL_ITEM">
4638                                         <context link="stream" jump="distribution" field="holding_lib" />
4639                                 </create>
4640                                 <retrieve permission="ADMIN_SERIAL_ITEM">
4641                                         <context link="stream" jump="distribution" field="holding_lib" />
4642                                 </retrieve>
4643                                 <update permission="ADMIN_SERIAL_ITEM">
4644                                         <context link="stream" jump="distribution" field="holding_lib" />
4645                                 </update>
4646                                 <delete permission="ADMIN_SERIAL_ITEM">
4647                                         <context link="stream" jump="distribution" field="holding_lib" />
4648                                 </delete>
4649                         </actions>
4650                 </permacrud>
4651         </class>
4652
4653         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
4654                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
4655                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4656                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
4657                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4658                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4659                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4660                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4661                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4662                 </fields>
4663                 <links>
4664                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
4665                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4666                 </links>
4667                 <!-- Not available via PCRUD at this time -->
4668         </class>
4669         <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">
4670                 <fields>
4671                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
4672                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
4673                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
4674                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
4675                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
4676                 </fields>
4677                 <links>
4678                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4679                 </links>
4680         </class>
4681         <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">
4682                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
4683                         <field name="id" reporter:label="ID" reporter:datatype="id" />
4684                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
4685                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
4686                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
4687                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
4688                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
4689                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
4690                 </fields>
4691                 <links>
4692                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
4693                 </links>
4694         </class>
4695         <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">
4696                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
4697                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4698                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4699                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4700                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4701                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4702                 </fields>
4703                 <links>
4704                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4705                 </links>
4706                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4707                         <actions>
4708                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4709                                         <context link="distribution" field="holding_lib" />
4710                                 </create>
4711                                 <retrieve/>
4712                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4713                                         <context link="distribution" field="holding_lib" />
4714                                 </update>
4715                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4716                                         <context link="distribution" field="holding_lib" />
4717                                 </delete>
4718                         </actions>
4719                 </permacrud>
4720         </class>
4721
4722         <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">
4723                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
4724                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4725                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4726                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4727                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4728                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4729                 </fields>
4730                 <links>
4731                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4732                 </links>
4733                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4734                         <actions>
4735                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4736                                         <context link="distribution" field="holding_lib" />
4737                                 </create>
4738                                 <retrieve/>
4739                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4740                                         <context link="distribution" field="holding_lib" />
4741                                 </update>
4742                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4743                                         <context link="distribution" field="holding_lib" />
4744                                 </delete>
4745                         </actions>
4746                 </permacrud>
4747         </class>
4748
4749         <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">
4750                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
4751                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4752                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4753                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
4754                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
4755                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
4756                 </fields>
4757                 <links>
4758                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4759                 </links>
4760                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4761                         <actions>
4762                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4763                                         <context link="distribution" field="holding_lib" />
4764                                 </create>
4765                                 <retrieve/>
4766                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4767                                         <context link="distribution" field="holding_lib" />
4768                                 </update>
4769                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4770                                         <context link="distribution" field="holding_lib" />
4771                                 </delete>
4772                         </actions>
4773                 </permacrud>
4774         </class>
4775
4776         <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">
4777                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
4778                         <field name="id" reporter:datatype="id" />
4779                         <field name="owning_copy" reporter:datatype="link"/>
4780                         <field name="stat_cat" reporter:datatype="link"/>
4781                         <field name="stat_cat_entry" reporter:datatype="link"/>
4782                 </fields>
4783                 <links>
4784                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
4785                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
4786                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
4787                 </links>
4788         </class>
4789         <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">
4790                 <fields oils_persist:primary="code">
4791                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
4792                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4793                 </fields>
4794                 <links/>
4795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4796             <actions>
4797                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
4798                 <retrieve/>
4799                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
4800                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
4801             </actions>
4802         </permacrud>
4803         </class>
4804         <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">
4805                 <fields oils_persist:primary="code">
4806                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
4807                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
4808                 </fields>
4809                 <links/>
4810         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4811             <actions>
4812                 <create permission="CREATE_MARC_CODE" global_required="true"/>
4813                 <retrieve/>
4814                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
4815                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
4816             </actions>
4817         </permacrud>
4818         </class>
4819         <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">
4820                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
4821                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
4822                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
4823                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
4824                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
4825                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
4826                 </fields>
4827                 <links>
4828             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
4829         </links>
4830         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4831             <actions>
4832                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4833                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4834                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4835                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
4836             </actions>
4837         </permacrud>
4838         </class>
4839         <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">
4840                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
4841                         <field name="id" reporter:datatype="id" />
4842                         <field name="name" reporter:datatype="text"/>
4843                 </fields>
4844                 <links/>
4845         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4846             <actions>
4847                 <create permission="CREATE_LASSO" global_required="true"/>
4848                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
4849                 <update permission="UPDATE_LASSO" global_required="true"/>
4850                 <delete permission="DELETE_LASSO" global_required="true"/>
4851             </actions>
4852         </permacrud>
4853         </class>
4854         <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">
4855                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
4856                         <field name="id" reporter:datatype="id" />
4857                         <field name="lasso" reporter:datatype="link"/>
4858                         <field name="org_unit" reporter:datatype="org_unit"/>
4859                 </fields>
4860                 <links>
4861                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
4862                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4863                 </links>
4864         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4865             <actions>
4866                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
4867                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
4868                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
4869                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
4870             </actions>
4871         </permacrud>
4872         </class>
4873         <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">
4874                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4875                         <field name="id" reporter:datatype="id" />
4876                         <field name="from_org" reporter:datatype="org_unit"/>
4877                         <field name="to_org" reporter:datatype="org_unit"/>
4878                         <field name="prox" reporter:datatype="int" />
4879                 </fields>
4880                 <links>
4881                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
4882                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
4883                 </links>
4884         </class>
4885         <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">
4886                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
4887                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4888                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
4889                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
4890                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
4891                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
4892                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
4893                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
4894                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
4895                 </fields>
4896                 <links/>
4897         </class>
4898         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
4899                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
4900                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
4901                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
4902                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
4903                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
4904                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
4905                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
4906                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
4907                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4908                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
4909                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
4910                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
4911                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
4912                 </fields>
4913                 <links>
4914                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4915                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
4916                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
4917                 </links>
4918         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4919             <actions>
4920                 <create permission="ADMIN_SURVEY" context_field="owner"/>
4921                 <retrieve/>
4922                 <update permission="ADMIN_SURVEY" context_field="owner"/>
4923                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
4924             </actions>
4925         </permacrud>
4926         </class>
4927         <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">
4928                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
4929                         <field name="address_type"  reporter:datatype="text"/>
4930                         <field name="city"  reporter:datatype="text"/>
4931                         <field name="country"  reporter:datatype="text"/>
4932                         <field name="county"  reporter:datatype="text"/>
4933                         <field name="id" reporter:datatype="id" />
4934                         <field name="org_unit" reporter:datatype="org_unit"/>
4935                         <field name="post_code"  reporter:datatype="text"/>
4936                         <field name="state"  reporter:datatype="text"/>
4937                         <field name="street1"  reporter:datatype="text"/>
4938                         <field name="street2"  reporter:datatype="text"/>
4939                         <field name="valid" reporter:datatype="bool"/>
4940                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
4941                 </fields>
4942                 <links>
4943                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
4944                 </links>
4945         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4946             <actions>
4947                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
4948                 <retrieve/>
4949                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
4950                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
4951             </actions>
4952         </permacrud>
4953         </class>
4954         <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">
4955                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
4956                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4957                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4958                         <field name="query_text" reporter:datatype="text"/>
4959                 </fields>
4960         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4961             <actions>
4962                 <retrieve/>
4963             </actions>
4964         </permacrud>
4965         </class>
4966
4967         <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">
4968                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
4969                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
4970                         <field name="owner" reporter:datatype="org_unit"/>
4971                         <field name="code" reporter:datatype="text"/>
4972                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
4973                         <field name="create_date" reporter:datatype="timestamp"/>
4974                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
4975                 </fields>
4976                 <links>
4977                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4978                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
4979                 </links>
4980         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4981             <actions>
4982                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4983                 <retrieve/>
4984                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4985                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
4986             </actions>
4987         </permacrud>
4988         </class>
4989         <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">
4990                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
4991                         <field name="id" reporter:datatype="id"/>
4992                         <field name="grp" reporter:datatype="link"/>
4993                         <field name="pos" reporter:datatype="int"/>
4994                         <field name="query" reporter:datatype="link"/>
4995                 </fields>
4996                 <links>
4997                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
4998                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
4999                 </links>
5000         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5001             <actions>
5002                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5003                     <context link="grp" field="owner"/>
5004                 </create>
5005                 <retrieve/>
5006                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5007                     <context link="grp" field="owner"/>
5008                 </update>
5009                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5010                     <context link="grp" field="owner"/>
5011                 </delete>
5012             </actions>
5013         </permacrud>
5014         </class>
5015
5016         <!-- A note: Please update alhr and ahopl when updating ahr -->
5017         <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">
5018                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5019                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5020                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5021                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5022                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5023                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5024                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5025                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5026                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5027                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5028                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5029                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5030                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5031                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5032                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5033                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5034                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5035                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5036                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5037                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5038                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5039                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5040                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5041                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5042                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5043                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5044                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5045                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5046                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5047                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5048                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5049                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5050                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5051                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5052                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5053                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5054                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5055                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5056                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5057                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5058                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5059                 </fields>
5060                 <links>
5061                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5062                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5063                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5064                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5065                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5066                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5067                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5068                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5069                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5070                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5071                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5072                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5073                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5074                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5075                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5076                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5077                 </links>
5078                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5079                         <actions>
5080                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5081                         </actions>
5082                 </permacrud>
5083         </class>
5084         <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">
5085                 <oils_persist:source_definition><![CDATA[
5086                 SELECT
5087                         ahr.*,
5088                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5089                                 copy_location_order_position,
5090                         CASE WHEN au.alias IS NOT NULL THEN
5091                                 au.alias
5092                         ELSE
5093                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5094                                         COALESCE(au.family_name, ''),
5095                                         COALESCE(au.suffix, ''),
5096                                         ', ',
5097                                         COALESCE(au.prefix, ''),
5098                                         COALESCE(au.first_given_name, ''),
5099                                         COALESCE(au.second_given_name, '')
5100                                 ], ' '), E'\\s+,', ',')
5101                         END AS usr_display_name,
5102                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5103                                 AS call_number_label,
5104                         siss.label AS issuance_label,
5105                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5106                         ahcm_1.copy_count AS potential_copies
5107                 FROM action.hold_request ahr
5108                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5109                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5110                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5111                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5112                 JOIN actor.usr au ON (au.id = ahr.usr)
5113                 JOIN (
5114                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5115                         FROM asset.copy_location
5116                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5117                 LEFT JOIN actor.usr_standing_penalty ausp 
5118                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5119                 LEFT JOIN config.standing_penalty csp
5120                         ON (
5121                                 csp.id = ausp.standing_penalty AND 
5122                                 csp.block_list LIKE '%CAPTURE%' AND (
5123                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5124                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5125                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5126                                         )
5127                                 )
5128                         )
5129                 JOIN (
5130                         SELECT COUNT(target_copy) AS copy_count, hold
5131                         FROM action.hold_copy_map
5132                         GROUP BY 2
5133                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5134                 LEFT JOIN serial.issuance siss
5135                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5136                 LEFT JOIN asset.copy_location_order acplo
5137                         ON (acp.location = acplo.location AND
5138                                 acp.circ_lib = acplo.org)
5139                 WHERE
5140                         ahr.capture_time IS NULL AND
5141                         ahr.cancel_time IS NULL AND
5142                         csp.id IS NULL AND
5143                         (ahr.expire_time is NULL OR ahr.expire_time > NOW())
5144                 ]]></oils_persist:source_definition>
5145                 <fields oils_persist:primary="id">
5146                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5147                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5148                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5149                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5150                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5151                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5152                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5153                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5154                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5155                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5156                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5157                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5158                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5159                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5160                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5161                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5162                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5163                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5164                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5165                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5166                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5167                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5168                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5169                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5170                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5171                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5172                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5173                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5174                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5175                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5176                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5177                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5178                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5179                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5180                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5181                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5182                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5183                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5184                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5185                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5186                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5187                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5188                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5189                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5190                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5191                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5192                 </fields>
5193                 <links>
5194                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5195                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5196                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5197                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5198                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5199                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5200                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5201                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5202                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5203                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5204                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5205                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5206                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5207                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5208                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5209                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5210                 </links>
5211                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5212                         <actions>
5213                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5214                         </actions>
5215                 </permacrud>
5216         </class>
5217         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5218                 <oils_persist:source_definition>
5219                         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)
5220                 </oils_persist:source_definition>
5221                 <fields oils_persist:primary="id">
5222                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5223                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5224                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5225                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5226                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5227                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5228                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5229                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5230                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5231                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5232                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5233                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5234                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5235                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5236                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5237                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5238                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5239                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5240                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5241                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5242                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5243                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5244                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5245                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5246                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5247                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5248                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5249                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5250                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5251                         <field reporter:label="Thaw Date (if frozen)" name="thaw_date" reporter:datatype="timestamp"/>
5252                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5253                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5254                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5255                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5256                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5257                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5258                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5259                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5260                 </fields>
5261                 <links>
5262                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5263                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5264                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5265                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5266                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5267                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5268                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5269                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5270                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5271                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5272                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5273                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5274                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5275                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5276                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5277                 </links>
5278         </class>
5279
5280         <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">
5281                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5282                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5283                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5284                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5285                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5286                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5287                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5288                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5289                 </fields>
5290                 <links>
5291                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5292                 </links>
5293                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5294                         <actions>
5295                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5296                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5297                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5298                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5299                         </actions>
5300                 </permacrud>
5301         </class>
5302         <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">
5303                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5304                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5305                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5306                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5307                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5308                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5309                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5310                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5311                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5312                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5313                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5314                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5315                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5316                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5317                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5318                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5319                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5320                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5321                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5322                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5323                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5324                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5325                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5326                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5327                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5328                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5329                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5330                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5331                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5332                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5333                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5334                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5335                 </fields>
5336                 <links>
5337                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5338                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5339                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5340                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5341                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5342                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5343                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5344                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5345                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5346                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5347                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5348                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5349                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5350                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5351                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5352                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5353                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5354                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5355                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5356                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5357                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5358                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5359                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5360                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5361                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
5362                 </links>
5363         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5364             <actions>
5365                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
5366                 <retrieve />
5367                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
5368                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
5369             </actions>
5370         </permacrud>
5371         </class>
5372         <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">
5373                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
5374                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5375                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
5376                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
5377                 </fields>
5378                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5379                         <actions>
5380                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5381                                 <retrieve/>
5382                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5383                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5384                         </actions>
5385                 </permacrud>
5386         </class>
5387         <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">
5388                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
5389                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5390                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
5391                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
5392                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
5393                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
5394                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
5395                 </fields>
5396                 <links>
5397                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
5398                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5399                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
5400                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
5401                 </links>
5402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5403                         <actions>
5404                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5405                                 <retrieve/>
5406                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5407                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
5408                         </actions>
5409                 </permacrud>
5410         </class>
5411         <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">
5412                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
5413                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5414                         <field name="btype" reporter:datatype="text"/>
5415                         <field name="id" reporter:datatype="id" />
5416                         <field name="name"  reporter:datatype="text"/>
5417                         <field name="description" reporter:datatype="text"/>
5418                         <field name="owner" reporter:datatype="link"/>
5419                         <field name="pub" reporter:datatype="bool"/>
5420                         <field name="create_time" reporter:datatype="timestamp" />
5421                 </fields>
5422                 <links>
5423                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5424                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
5425                 </links>
5426         </class>
5427         <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">
5428                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
5429                         <field name="id" reporter:datatype="id" />
5430                         <field name="bucket" reporter:datatype="link"/>
5431                         <field name="note" reporter:datatype="text" />
5432                 </fields>
5433                 <links>
5434                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
5435                 </links>
5436         </class>
5437         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
5438                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
5439                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5440                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5441                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5442                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5443                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5444                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5445                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5446                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5447                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5448                 </fields>
5449                 <links>
5450                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5451                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
5452                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
5453                 </links>
5454         </class>
5455         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
5456                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
5457                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
5458                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5459                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
5460                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5461                 </fields>
5462                 <links>
5463                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5464                 </links>
5465                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5466                         <actions>
5467                                 <retrieve permission="VIEW_USER">
5468                                         <context link="usr" field="home_ou" />
5469                                 </retrieve>
5470                         </actions>
5471                 </permacrud>
5472         </class>
5473     <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">
5474         <fields oils_persist:primary="field">
5475             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
5476             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
5477             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
5478         </fields>
5479         <links/>
5480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5481             <actions>
5482                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
5483                 <retrieve />
5484                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
5485                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
5486             </actions>
5487         </permacrud>
5488     </class>
5489         <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">
5490                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
5491                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5492                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5493                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
5494                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5495                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5496                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5497                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
5498                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
5499                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
5500                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
5501                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
5502                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
5503                 </fields>
5504                 <links>
5505                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5506                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
5507                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
5508                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
5509                 </links>
5510         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5511             <actions>
5512                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
5513                 <retrieve />
5514                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
5515                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
5516             </actions>
5517         </permacrud>
5518         </class>
5519         <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">
5520                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
5521                         <field name="field" reporter:datatype="link"/>
5522                         <field name="id" reporter:datatype="id" />
5523                         <field name="source" reporter:datatype="link"/>
5524                         <field name="value"  reporter:datatype="text"/>
5525                 </fields>
5526                 <links>
5527                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5528                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5529                 </links>
5530         </class>
5531         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
5532                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
5533                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
5534                         <field name="btype" reporter:datatype="text"/>
5535                         <field name="id" reporter:datatype="id" />
5536                         <field name="name"  reporter:datatype="text"/>
5537                         <field name="description" reporter:datatype="text"/>
5538                         <field name="owner" reporter:datatype="link"/>
5539                         <field name="pub" reporter:datatype="bool"/>
5540                         <field name="create_time" reporter:datatype="timestamp" />
5541                 </fields>
5542                 <links>
5543                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
5544                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
5545                 </links>
5546         </class>
5547         <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">
5548                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
5549                         <field name="id" reporter:datatype="id" />
5550                         <field name="bucket" reporter:datatype="link"/>
5551                         <field name="note" reporter:datatype="text" />
5552                 </fields>
5553                 <links>
5554                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5555                 </links>
5556         </class>
5557         <class id="mcrp" controller="open-ils.cstore" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
5558                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5559                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5560                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5561                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5562                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
5563                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
5564                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5565                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
5566                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
5567                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5568                 </fields>
5569                 <links>
5570                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5571                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5572                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5573                 </links>
5574         </class>
5575         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
5576                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
5577                         <field name="id" reporter:datatype="id" />
5578                         <field name="ind1" />
5579                         <field name="ind2" />
5580                         <field name="record" />
5581                         <field name="subfield" />
5582                         <field name="tag" />
5583                         <field name="value" />
5584                 </fields>
5585                 <links>
5586                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
5587                 </links>
5588         </class>
5589         <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">
5590                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
5591                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
5592                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5593                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
5594                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5595                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
5596                 </fields>
5597                 <links>
5598                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5599                 </links>
5600         </class>
5601         <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">
5602                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
5603                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
5604                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
5605                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
5606                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
5607                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
5608                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
5609                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
5610                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
5611                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
5612                 </fields>
5613                 <links>
5614                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
5615                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
5616                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
5617                 </links>
5618         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5619             <actions>
5620                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
5621                 <retrieve/>
5622                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
5623                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
5624             </actions>
5625         </permacrud>
5626         </class>
5627         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
5628                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
5629                         <field name="create_date" reporter:datatype="timestamp"/>
5630                         <field name="creator" reporter:datatype="link"/>
5631                         <field name="edit_date" reporter:datatype="timestamp"/>
5632                         <field name="editor" reporter:datatype="link"/>
5633                         <field name="id" reporter:datatype="id" />
5634                         <field name="pub" reporter:datatype="bool"/>
5635                         <field name="record" reporter:datatype="link"/>
5636                         <field name="value"  reporter:datatype="text"/>
5637                 </fields>
5638                 <links>
5639                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5640                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5641                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
5642                 </links>
5643         </class>
5644         <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">
5645                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5646                         <field name="balance_owed" reporter:datatype="money" />
5647                         <field name="total_owed" reporter:datatype="money" />
5648                         <field name="total_paid" reporter:datatype="money" />
5649                         <field name="usr" reporter:datatype="link"/>
5650                 </fields>
5651                 <links>
5652                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5653                 </links>
5654         </class>
5655         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
5656                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5657                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
5658                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5659                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
5660                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5661                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
5662                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
5663                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5664                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5665                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
5666                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5667                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5668                 </fields>
5669                 <links>
5670                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5671                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
5672                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5673                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5674                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
5675                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5676                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5677                 </links>
5678         </class>
5679         <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">
5680                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
5681                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
5682                         <field name="quality" reporter:datatype="int" />
5683                         <field name="source" reporter:datatype="text"/>
5684                         <field name="transcendant" reporter:datatype="bool"/>
5685                         <field name="can_have_copies" reporter:datatype="bool"/>
5686                 </fields>
5687                 <links/>
5688         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5689             <actions>
5690                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
5691                 <retrieve/>
5692                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
5693                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
5694             </actions>
5695         </permacrud>
5696         </class>
5697         <class id="mbt" controller="open-ils.cstore" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
5698                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
5699                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
5700                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
5701                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
5702                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
5703                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
5704                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
5705                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5706                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
5707                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
5708                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
5709                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
5710                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
5711                 </fields>
5712                 <links>
5713                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
5714                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5715                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5716                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
5717                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
5718                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
5719                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
5720                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
5721                 </links>
5722         </class>
5723         <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">
5724                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
5725                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
5726                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
5727                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5728                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
5729                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5730                 </fields>
5731                 <links>
5732                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5733                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5734                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
5735                 </links>
5736         </class>
5737         <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">
5738                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
5739                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
5740                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
5741                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
5742                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
5743                 </fields>
5744                 <links>
5745                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
5746                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5747                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
5748                 </links>
5749         </class>
5750         <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">
5751                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
5752                         <field name="bucket" reporter:datatype="link"/>
5753                         <field name="id" reporter:datatype="id" />
5754                         <field name="target_user" reporter:datatype="link"/>
5755                         <field name="create_time" reporter:datatype="timestamp" />
5756                         <field name="pos" reporter:datatype="int" />
5757                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
5758                 </fields>
5759                 <links>
5760                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
5761                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
5762             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
5763                 </links>
5764         </class>
5765         <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">
5766                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
5767                         <field name="id" reporter:datatype="id" />
5768                         <field name="item" reporter:datatype="link"/>
5769                         <field name="note" reporter:datatype="text" />
5770                 </fields>
5771                 <links>
5772                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
5773                 </links>
5774         </class>
5775         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
5776                 <fields oils_persist:primary="usr" oils_persist:sequence="">
5777                         <field name="balance_owed" reporter:datatype="money" />
5778                         <field name="total_owed" reporter:datatype="money" />
5779                         <field name="total_paid" reporter:datatype="money" />
5780                         <field name="usr" reporter:datatype="link"/>
5781                 </fields>
5782                 <links>
5783                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5784                 </links>
5785         </class>
5786         <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">
5787                 <fields oils_persist:primary="code" oils_persist:sequence="">
5788                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
5789                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
5790                         <field reporter:label="LitF Name" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
5791                 </fields>
5792                 <links/>
5793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5794             <actions>
5795                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5796                 <retrieve/>
5797                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5798                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5799             </actions>
5800         </permacrud>
5801         </class>
5802         <class id="mwp" controller="open-ils.cstore" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
5803                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5804                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5805                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5806                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5807                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5808                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5809                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5810                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5811                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5812                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5813                 </fields>
5814                 <links>
5815                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5816                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5817                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5818                 </links>
5819         </class>
5820         <class id="mgp" controller="open-ils.cstore" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
5821                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5822                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5823                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5824                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5825                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5826                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5827                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5828                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
5829                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5830                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5831                 </fields>
5832                 <links>
5833                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5834                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5835                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5836                 </links>
5837         </class>
5838         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
5839                 <fields oils_persist:primary="id" oils_persist:sequence="">
5840                         <field name="checkin_lib" reporter:datatype="link"/>
5841                         <field name="checkin_staff" reporter:datatype="link"/>
5842                         <field name="checkin_time" reporter:datatype="timestamp"/>
5843                         <field name="circ_lib"  reporter:datatype="org_unit"/>
5844                         <field name="circ_staff" reporter:datatype="link"/>
5845                         <field name="desk_renewal" reporter:datatype="bool"/>
5846                         <field name="due_date" reporter:datatype="timestamp"/>
5847                         <field name="duration" reporter:datatype="interval"/>
5848                         <field name="duration_rule" reporter:datatype="link"/>
5849                         <field name="fine_interval" reporter:datatype="interval"/>
5850                         <field name="id" reporter:datatype="id" />
5851                         <field name="max_fine" reporter:datatype="money" />
5852                         <field name="max_fine_rule" reporter:datatype="link"/>
5853                         <field name="opac_renewal" reporter:datatype="bool"/>
5854                         <field name="phone_renewal" reporter:datatype="bool"/>
5855                         <field name="recurring_fine" reporter:datatype="money" />
5856                         <field name="recurring_fine_rule" reporter:datatype="link"/>
5857                         <field name="renewal_remaining" reporter:datatype="int" />
5858             <field name="grace_period" reporter:datatype="interval" />
5859                         <field name="stop_fines" reporter:datatype="text"/>
5860                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
5861                         <field name="target_copy" reporter:datatype="link"/>
5862                         <field name="usr" reporter:datatype="link"/>
5863                         <field name="xact_finish" reporter:datatype="timestamp" />
5864                         <field name="xact_start" reporter:datatype="timestamp" />
5865                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
5866                 </fields>
5867                 <links>
5868                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
5869                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
5870                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
5871                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
5872                 </links>
5873         </class>
5874         <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">
5875                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
5876                         <field name="field" reporter:datatype="link"/>
5877                         <field name="id" reporter:datatype="id" />
5878                         <field name="source" reporter:datatype="link"/>
5879                         <field name="value" reporter:datatype="text"/>
5880                 </fields>
5881                 <links>
5882                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
5883                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5884                 </links>
5885         </class>
5886         <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">
5887                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
5888                         <field name="high" reporter:datatype="money" />
5889                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
5890                         <field name="low" reporter:datatype="money" />
5891                         <field name="name" reporter:datatype="text"/>
5892                         <field name="normal" reporter:datatype="money" />
5893                         <field name="recurrence_interval" reporter:datatype="interval"/>
5894             <field name="grace_period" reporter:datatype="interval" />
5895                 </fields>
5896                 <links/>
5897         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5898             <actions>
5899                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5900                 <retrieve/>
5901                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5902                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
5903             </actions>
5904         </permacrud>
5905         </class>
5906         <class id="mckp" controller="open-ils.cstore" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
5907                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
5908                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
5909                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
5910                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
5911                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
5912                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
5913                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
5914                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
5915                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
5916                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
5917                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
5918                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
5919                 </fields>
5920                 <links>
5921                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
5922                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
5923                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
5924                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
5925                 </links>
5926         </class>
5927         <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">
5928                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
5929                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
5930                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5931                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5932                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5933                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5934                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5935                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5936                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5937                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5938                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5939                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5940                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5941                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5942                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5943                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5944                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5945                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5946                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5947                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5948                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5949                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5950                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5951                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
5952                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5953                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5954                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5955                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5956                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5957                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5958                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5959                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5960                         <field reporter:label="Is Floating" name="floating" reporter:datatype="bool"/>
5961                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5962                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5963                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5964                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5965                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5966                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
5967                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5968                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5969                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
5970                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5971                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
5972                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
5973                 </fields>
5974                 <links>
5975                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5976                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5977                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5978                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5979                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5980                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5981                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5982                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5983                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5984                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5985                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5986                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5987                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5988                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
5989                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5990                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
5991                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
5992                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
5993                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
5994                 </links>
5995         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5996             <actions>
5997                 <create permission="CREATE_COPY">
5998                     <context link="call_number" field="owning_lib"/>
5999                 </create>
6000                 <retrieve/>
6001                 <update permission="UPDATE_COPY">
6002                     <context link="call_number" field="owning_lib"/>
6003                 </update>
6004                 <delete permission="DELETE_COPY">
6005                     <context link="call_number" field="owning_lib"/>
6006                 </delete>
6007             </actions>
6008         </permacrud>
6009         </class>
6010
6011         <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">
6012                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6013                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6014                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6015                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6016                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6017                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6018                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6019                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6020                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6021                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6022                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6023                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6024                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6025                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6026                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6027                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6028                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6029                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6030                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6031                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6032                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6033                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6034                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6035                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6036                         <field reporter:label="Floating?" name="floating" reporter:datatype="bool"/>
6037                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6038                 </fields>
6039                 <links>
6040                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6041                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6042                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6043                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6044                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6045                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6046                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6047                 </links>
6048                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6049                         <actions>
6050                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6051                                 <retrieve />
6052                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6053                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6054                         </actions>
6055                 </permacrud>
6056         </class>
6057
6058         <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">
6059                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6060                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6061                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6062                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6063                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6064                 </fields>
6065                 <links/>
6066         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6067             <actions>
6068                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6069                 <retrieve/>
6070                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6071                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6072             </actions>
6073         </permacrud>
6074         </class>
6075         <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">
6076                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6077                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6078                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6079                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6080                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6081                 </fields>
6082                 <links/>
6083         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6084             <actions>
6085                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6086                 <retrieve/>
6087                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6088                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6089             </actions>
6090         </permacrud>
6091         </class>
6092         <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">
6093                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6094                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6095                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6096                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6097                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6098                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6099                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6100                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6101                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6102                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6103                 </fields>
6104                 <links>
6105                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6106                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6107                 </links>
6108         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6109             <actions>
6110                 <create permission="CREATE_PERM" global_required="true"/>
6111                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6112                 <update permission="UPDATE_PERM" global_required="true"/>
6113                 <delete permission="DELETE_PERM" global_required="true"/>
6114             </actions>
6115         </permacrud>
6116         </class>
6117         <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">
6118                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6119                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6120                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6121                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6122                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6123                 </fields>
6124                 <links>
6125                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6126                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6127                 </links>
6128         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6129             <actions>
6130                 <create permission="ADMIN_SURVEY">
6131                     <context link="question" jump="survey" field="owner"/>
6132                 </create>
6133                 <retrieve/>
6134                 <update permission="ADMIN_SURVEY">
6135                     <context link="question" jump="survey" field="owner"/>
6136                 </update>
6137                 <delete permission="ADMIN_SURVEY">
6138                     <context link="question" jump="survey" field="owner"/>
6139                 </delete>
6140             </actions>
6141         </permacrud>
6142         </class>
6143         <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">
6144                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6145                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6146                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6147                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6148                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6149                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6150                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6151                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6152                 </fields>
6153                 <links>
6154                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6155                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6156                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6157                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6158                 </links>
6159         </class>
6160         <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">
6161                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6162                         <field name="balance_owed" reporter:datatype="money" />
6163                         <field name="total_owed" reporter:datatype="money" />
6164                         <field name="total_paid" reporter:datatype="money" />
6165                         <field name="usr" reporter:datatype="link"/>
6166                 </fields>
6167                 <links>
6168                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6169                 </links>
6170         </class>
6171         <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">
6172                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6173                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6174                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6175                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6176                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6177                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6178                 </fields>
6179                 <links>
6180                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6181                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6182                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6183                 </links>
6184         </class>
6185         <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">
6186                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6187                         <field name="field" reporter:datatype="link"/>
6188                         <field name="id" reporter:datatype="id" />
6189                         <field name="source" reporter:datatype="link"/>
6190                         <field name="value" reporter:datatype="text"/>
6191                 </fields>
6192                 <links>
6193                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6194                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6195                 </links>
6196         </class>
6197         <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">
6198                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6199                         <field name="field" reporter:datatype="link"/>
6200                         <field name="id" reporter:datatype="id" />
6201                         <field name="source" reporter:datatype="link"/>
6202                         <field name="value" reporter:datatype="text"/>
6203                 </fields>
6204                 <links>
6205                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6206                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6207                 </links>
6208         </class>
6209         <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">
6210                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6211                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6212                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6213                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6214                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6215                 </fields>
6216                 <links>
6217                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6218                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6219                 </links>
6220         </class>
6221         <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">
6222                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6223                         <field name="depth" reporter:datatype="int" />
6224                         <field name="grantable" reporter:datatype="bool"/>
6225                         <field name="grp" reporter:datatype="link"/>
6226                         <field name="id" reporter:datatype="id" />
6227                         <field name="perm" reporter:datatype="link"/>
6228                 </fields>
6229                 <links>
6230                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6231                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6232                 </links>
6233         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6234             <actions>
6235                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6236                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6237                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6238                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6239             </actions>
6240         </permacrud>
6241         </class>
6242         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6243                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6244                         <field name="items" oils_persist:virtual="true" />
6245                         <field name="btype" reporter:datatype="text"/>
6246                         <field name="id" reporter:datatype="id" />
6247                         <field name="name" reporter:datatype="text"/>
6248                         <field name="description" reporter:datatype="text"/>
6249                         <field name="owner" reporter:datatype="link"/>
6250                         <field name="pub" reporter:datatype="bool"/>
6251                         <field name="create_time" reporter:datatype="timestamp" />
6252                 </fields>
6253                 <links>
6254                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6255                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6256                 </links>
6257         </class>
6258         <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">
6259                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6260                         <field name="id" reporter:datatype="id" />
6261                         <field name="bucket" reporter:datatype="link"/>
6262                         <field name="note" reporter:datatype="text" />
6263                 </fields>
6264                 <links>
6265                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6266                 </links>
6267         </class>
6268         <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">
6269                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6270                         <field name="id" reporter:datatype="int" />
6271                         <field name="usr" reporter:datatype="link"/>
6272                         <field name="work_ou" reporter:datatype="link"/>
6273                 </fields>
6274                 <links>
6275                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6276                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6277                 </links>
6278         </class>
6279         <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">
6280                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6281                         <field name="depth" reporter:datatype="int"/>
6282                         <field name="grantable" reporter:datatype="bool"/>
6283                         <field name="id" reporter:datatype="id" />
6284                         <field name="perm" reporter:datatype="link"/>
6285                         <field name="usr" reporter:datatype="link"/>
6286                 </fields>
6287                 <links>
6288                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6289                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6290                 </links>
6291         </class>
6292         <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">
6293                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
6294                         <field name="object_id" reporter:datatype="text"/>
6295                         <field name="grantable" reporter:datatype="bool"/>
6296                         <field name="id" reporter:datatype="id" />
6297                         <field name="perm" reporter:datatype="link"/>
6298                         <field name="usr" reporter:datatype="link"/>
6299                         <field name="object_type" reporter:datatype="text"/>
6300                 </fields>
6301                 <links>
6302                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6303                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6304                 </links>
6305         </class>
6306         <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">
6307                 <fields oils_persist:primary="id" oils_persist:sequence="">
6308                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6309                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6310                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6311                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6312                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6313                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6314                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6315                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6316                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6317                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6318                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6319                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6320                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6321                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6322                 </fields>
6323                 <links>
6324                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6325                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6326                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6327                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6328                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6329                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6330                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6331                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6332                 </links>
6333         </class>
6334         <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">
6335                 <fields oils_persist:primary="id" oils_persist:sequence="">
6336                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6337                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6338                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6339                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6340                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6341                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6342                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6343                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6344                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6345                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6346                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6347                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6348                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6349                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6350                 </fields>
6351                 <links>
6352                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6353                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6354                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6355                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6356                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6357                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6358                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6359                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6360                 </links>
6361         </class>
6362         <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">
6363                 <fields oils_persist:primary="id" oils_persist:sequence="">
6364                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6365                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6366                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6367                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6368                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6369                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6370                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6371                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6372                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6373                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6374                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6375                 </fields>
6376                 <links>
6377                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
6378                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
6379                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
6380                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
6381                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6382                 </links>
6383         </class>
6384         <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">
6385                 <fields oils_persist:primary="id" oils_persist:sequence="">
6386                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6387                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6388                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6389                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
6390                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
6391                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
6392                         <field reporter:label="Accepting User" name="accepting_usr" />
6393                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
6394                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6395                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6396                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6397                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
6398                 </fields>
6399                 <links>
6400                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
6401                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
6402                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
6403                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6404                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6405                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6406                 </links>
6407         </class>
6408         <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">
6409                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
6410                         <field name="bucket" reporter:datatype="link"/>
6411                         <field name="id" reporter:datatype="id" />
6412                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
6413                         <field name="create_time" reporter:datatype="timestamp" />
6414                         <field name="pos" reporter:datatype="int" />
6415                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6416                 </fields>
6417                 <links>
6418                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
6419                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
6420             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
6421                 </links>
6422         </class>
6423         <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">
6424                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
6425                         <field name="id" reporter:datatype="id" />
6426                         <field name="item" reporter:datatype="link"/>
6427                         <field name="note" reporter:datatype="text" />
6428                 </fields>
6429                 <links>
6430                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
6431                 </links>
6432         </class>
6433         <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">
6434                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
6435                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
6436                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6437                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6438                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
6439                 </fields>
6440                 <links>
6441                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
6442                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6443                 </links>
6444         </class>
6445     <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">
6446         <fields oils_persist:primary="field">
6447             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6448             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6449             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6450         </fields>
6451         <links/>
6452         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6453             <actions>
6454                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
6455                 <retrieve />
6456                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
6457                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
6458             </actions>
6459         </permacrud>
6460     </class>
6461         <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">
6462                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
6463                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
6464                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6465                 </fields>
6466                 <links/>
6467         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6468             <actions>
6469                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6470                 <retrieve/>
6471                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6472                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
6473             </actions>
6474         </permacrud>
6475         </class>
6476
6477
6478         <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">
6479                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6480                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6481                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6482                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6483                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
6484                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6485                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6486                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6487                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6488                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6489                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6490                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6491                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6492                 </fields>
6493                 <links>
6494                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6495                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
6496                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6497                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6498                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6499                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6500                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
6501                 </links>
6502         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6503             <actions>
6504                 <create permission="TRANSIT_COPY">
6505                     <context link="target_copy" field="owner"/>
6506                 </create>
6507                 <retrieve/>
6508                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6509                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6510             </actions>
6511         </permacrud>
6512         </class>
6513         <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">
6514                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
6515                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
6516                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
6517                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
6518                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
6519                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
6520                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
6521                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
6522                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
6523                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
6524                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
6525                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
6526                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
6527                 </fields>
6528                 <links>
6529                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
6530                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
6531                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
6532                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
6533                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
6534                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
6535                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6536                 </links>
6537         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6538             <actions>
6539                 <create permission="TRANSIT_COPY" context_field="owner">
6540                     <context link="target_copy" field="circ_lib"/>
6541                 </create>
6542                 <retrieve/>
6543                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
6544                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
6545             </actions>
6546         </permacrud>
6547         </class>
6548         <class id="mb" controller="open-ils.cstore" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
6549                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
6550                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6551                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
6552                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
6553                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
6554                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6555                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
6556                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
6557                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
6558                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6559                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
6560                 </fields>
6561                 <links>
6562                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6563                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
6564                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
6565                 </links>
6566         </class>
6567         <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">
6568                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
6569                         <field name="grp" />
6570                         <field name="id" reporter:datatype="id" />
6571                         <field name="usr" />
6572                 </fields>
6573                 <links>
6574                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6575                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6576                 </links>
6577         </class>
6578         <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">
6579                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
6580                         <field name="id" reporter:datatype="id" />
6581                         <field name="fq_field" reporter:datatype="text"/>
6582                         <field name="identity_value" reporter:datatype="text"/>
6583                         <field name="translation" reporter:datatype="text"/>
6584                         <field name="string" reporter:datatype="text"/>
6585                 </fields>
6586                 <links>
6587                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
6588                 </links>
6589         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6590             <actions>
6591                 <create permission="CREATE_TRANSLATION" global_required="true"/>
6592                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
6593                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
6594                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
6595             </actions>
6596         </permacrud>
6597         </class>
6598         <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">
6599                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
6600                         <field name="id" reporter:datatype="id" />
6601                         <field name="fm_class" reporter:datatype="text"/>
6602                         <field name="field" reporter:datatype="text"/>
6603                         <field name="owner" reporter:datatype="org_unit"/>
6604                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
6605                 </fields>
6606                 <links>
6607                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6608                 </links>
6609         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6610             <actions>
6611                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6612                 <retrieve/>
6613                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6614                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
6615             </actions>
6616         </permacrud>
6617         </class>
6618         <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">
6619                 <fields oils_persist:primary="code">
6620                         <field name="code" reporter:datatype="id" />
6621                         <field name="marc_code" reporter:datatype="text"/>
6622                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6623                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6624                 </fields>
6625                 <links/>
6626         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6627             <actions>
6628                 <create permission="CREATE_LOCALE" global_required="true"/>
6629                 <retrieve/>
6630                 <update permission="UPDATE_LOCALE" global_required="true"/>
6631                 <delete permission="DELETE_LOCALE" global_required="true"/>
6632             </actions>
6633         </permacrud>
6634         </class>
6635         <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">
6636                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
6637                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
6638                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
6639                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
6640             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
6641                 </fields>
6642                 <links>
6643                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6644                 </links>
6645         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6646             <actions>
6647                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
6648                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
6649                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
6650                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
6651             </actions>
6652         </permacrud>
6653         </class>
6654
6655         <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">
6656                 <fields oils_persist:primary="id">
6657                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6658                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6659                 </fields>
6660                 <links/>
6661         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6662             <actions>
6663                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6664                 <retrieve/>
6665                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6666                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
6667             </actions>
6668         </permacrud>
6669         </class>
6670
6671         <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">
6672                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
6673                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
6674                         <field reporter:label="User" name="usr" reporter:datatype="link" />
6675                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
6676                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
6677                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
6678                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
6679                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
6680                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
6681                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
6682                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
6683                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
6684                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
6685                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
6686                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
6687                         <field reporter:label="Title" name="title" reporter:datatype="text" />
6688                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
6689                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6690                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
6691                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
6692                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
6693                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
6694                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
6695                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
6696                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
6697                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
6698                 </fields>
6699                 <links>
6700                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6701                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
6702                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6703                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
6704                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
6705                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
6706                 </links>
6707         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6708             <actions>
6709                 <create permission="user_request.create">
6710                     <context link="usr" field="home_ou"/>
6711                                 </create>
6712                 <retrieve permission="user_request.view">
6713                     <context link="usr" field="home_ou"/>
6714                                 </retrieve>
6715                 <update permission="user_request.update">
6716                     <context link="usr" field="home_ou"/>
6717                                 </update>
6718                 <delete permission="user_request.delete">
6719                     <context link="usr" field="home_ou"/>
6720                                 </delete>
6721             </actions>
6722         </permacrud>
6723         </class>
6724
6725         <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">
6726                 <fields oils_persist:primary="code">
6727                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
6728                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
6729                 </fields>
6730                 <links/>
6731         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6732             <actions>
6733                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6734                 <retrieve/>
6735                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6736                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6737             </actions>
6738         </permacrud>
6739         </class>
6740
6741         <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">
6742                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
6743                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
6744                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
6745                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
6746                         <field reporter:label="Ratio" name="ratio" />
6747                 </fields>
6748                 <links>
6749                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
6750                         <link field="to_currency" reltype="has_a" key="code" map="" class="acqct"/>
6751                 </links>
6752                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6753                         <actions>
6754                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6755                                 <retrieve/>
6756                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6757                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
6758                         </actions>
6759                 </permacrud>
6760         </class>
6761
6762         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
6763                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
6764                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
6765                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
6766                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
6767                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
6768                         <field reporter:label="Code" name="code" reporter:datatype="text" />
6769                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
6770                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
6771                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
6772                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
6773                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
6774                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
6775                         <field reporter:label="URL" name="url" reporter:datatype="text" />
6776                         <field reporter:label="Email" name="email" reporter:datatype="text" />
6777                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
6778                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
6779                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
6780                 </fields>
6781                 <links>
6782                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
6783                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6784             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
6785             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
6786             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
6787                 </links>
6788         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6789             <actions>
6790                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
6791                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
6792                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
6793                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
6794             </actions>
6795         </permacrud>
6796         </class>
6797
6798         <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">
6799                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
6800                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
6801                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
6802                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
6803                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
6804                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
6805                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
6806                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
6807                 </fields>
6808                 <links>
6809                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6810                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6811                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6812                 </links>
6813         </class>
6814
6815         <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">
6816                 <fields oils_persist:primary="code">
6817                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
6818                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6819                 </fields>
6820                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6821             <actions>
6822                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6823                 <retrieve/>
6824                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6825                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
6826             </actions>
6827                 </permacrud>
6828         </class>
6829
6830         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
6831                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
6832                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
6833                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
6834                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6835                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
6836                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
6837                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
6838                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
6839                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
6840                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
6841                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
6842                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6843                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
6844                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
6845                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
6846                 </fields>
6847                 <links>
6848                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
6849                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6850                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
6851                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
6852                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
6853                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
6854                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
6855                 </links>
6856         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6857             <actions>
6858                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
6859                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
6860                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
6861                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
6862             </actions>
6863         </permacrud>
6864         </class>
6865
6866         <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">
6867                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
6868                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6869                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6870                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6871                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
6872                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
6873                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
6874                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6875                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
6876                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6877                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6878                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6879                 </fields>
6880                 <links>
6881                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6882                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6883                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
6884                 </links>
6885         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6886             <actions>
6887                 <create   permission="ADMIN_INVOICE">
6888                                         <context link="invoice" field="receiver"/>
6889                                 </create>
6890                 <retrieve permission="ADMIN_INVOICE">
6891                                         <context link="invoice" field="receiver"/>
6892                                 </retrieve>
6893                 <update   permission="ADMIN_INVOICE">
6894                                         <context link="invoice" field="receiver"/>
6895                                 </update>
6896                                 <delete   permission="ADMIN_INVOICE">
6897                                         <context link="invoice" field="receiver"/>
6898                                 </delete>
6899             </actions>
6900         </permacrud>
6901         </class>
6902
6903         <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">
6904                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
6905                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6906                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
6907                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
6908                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
6909                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
6910                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
6911                         <field reporter:label="Author" name="author" reporter:datatype="text" />
6912                         <field reporter:label="Note" name="note" reporter:datatype="text" />
6913                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
6914                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
6915                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
6916                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
6917                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
6918                         <field reporter:label="Target" name="target" reporter:datatype="int" />
6919                 </fields>
6920                 <links>
6921                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
6922                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
6923                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
6924                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
6925                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
6926                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
6927                 </links>
6928         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6929             <actions>
6930                 <create   permission="ADMIN_INVOICE">
6931                                         <context link="invoice" field="receiver"/>
6932                                 </create>
6933                 <retrieve permission="ADMIN_INVOICE">
6934                                         <context link="invoice" field="receiver"/>
6935                                 </retrieve>
6936                 <update   permission="ADMIN_INVOICE">
6937                                         <context link="invoice" field="receiver"/>
6938                                 </update>
6939                                 <delete   permission="ADMIN_INVOICE">
6940                                         <context link="invoice" field="receiver"/>
6941                                 </delete>
6942             </actions>
6943         </permacrud>
6944         </class>
6945
6946         <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">
6947                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
6948                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
6949                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
6950                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
6951                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
6952                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6953                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6954                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
6955                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
6956                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
6957                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
6958                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
6959                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
6960                 </fields>
6961                 <links>
6962                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6963                 </links>
6964         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6965             <actions>
6966                 <create permission="ADMIN_PROVIDER">
6967                     <context link="provider" field="owner"/>
6968                 </create>
6969                 <retrieve permission="ADMIN_PROVIDER">
6970                     <context link="provider" field="owner"/>
6971                 </retrieve>
6972                 <update permission="ADMIN_PROVIDER">
6973                     <context link="provider" field="owner"/>
6974                 </update>
6975                 <delete permission="ADMIN_PROVIDER">
6976                     <context link="provider" field="owner"/>
6977                 </delete>
6978             </actions>
6979         </permacrud>
6980         </class>
6981
6982         <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">
6983                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
6984                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6985                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
6986                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6987                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
6988                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
6989                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
6990         </fields>
6991                 <links>
6992                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
6993                 </links>
6994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6995             <actions>
6996                 <create permission="ADMIN_PROVIDER">
6997                     <context link="provider" field="owner"/>
6998                 </create>
6999                 <retrieve permission="ADMIN_PROVIDER">
7000                     <context link="provider" field="owner"/>
7001                 </retrieve>
7002                 <update permission="ADMIN_PROVIDER">
7003                     <context link="provider" field="owner"/>
7004                 </update>
7005                 <delete permission="ADMIN_PROVIDER">
7006                     <context link="provider" field="owner"/>
7007                 </delete>
7008             </actions>
7009         </permacrud>
7010     </class>
7011         <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">
7012                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7013                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7014                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7015                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7016                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7017                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7018                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7019                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7020                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7021                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7022                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7023                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7024                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7025                 </fields>
7026                 <links>
7027                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7028                 </links>
7029         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7030             <actions>
7031                 <create permission="ADMIN_PROVIDER">
7032                     <context link="contact" jump='provider' field="owner"/>
7033                 </create>
7034                 <retrieve permission="ADMIN_PROVIDER">
7035                     <context link="contact" jump='provider' field="owner"/>
7036                 </retrieve>
7037                 <update permission="ADMIN_PROVIDER">
7038                     <context link="contact" jump='provider' field="owner"/>
7039                 </update>
7040                 <delete permission="ADMIN_PROVIDER">
7041                     <context link="contact" jump='provider' field="owner"/>
7042                 </delete>
7043             </actions>
7044         </permacrud>
7045         </class>
7046
7047         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7048                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7049                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7050                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7051                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7052                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7053                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7054                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7055                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7056                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7057                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7058                 </fields>
7059                 <links>
7060                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7061                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7062                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7063                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7064                 </links>
7065         </class>
7066
7067         <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">
7068                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7069                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7070                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7071                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7072                 </fields>
7073                 <links>
7074             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7075                 </links>
7076                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7077                         <actions>
7078                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7079                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7080                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7081                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7082                         </actions>
7083                 </permacrud>
7084         </class>
7085
7086         <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">
7087                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7088                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7089                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7090                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7091                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7092                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7093                 </fields>
7094                 <links>
7095                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7096                 </links>
7097                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7098                         <actions>
7099                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7100                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7101                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7102                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7103                         </actions>
7104                 </permacrud>
7105         </class>
7106
7107         <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">
7108                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7109                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7110                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7111                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7112                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7113                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7114                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7115                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7116                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7117                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7118                 </fields>
7119                 <links>
7120                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7121                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7122             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7123             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7124                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7125                 </links>
7126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7127             <actions>
7128                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7129                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7130                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7131                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7132             </actions>
7133         </permacrud>
7134         </class>
7135
7136         <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">
7137                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7138                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7139                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7140                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7141                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7142                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7143                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7144                 </fields>
7145                 <links>
7146                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7147                 </links>
7148                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7149                         <actions>
7150                                 <create permission="ADMIN_FUNDING_SOURCE">
7151                     <context link="funding_source" field="owner"/>
7152                 </create>
7153                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7154                     <context link="funding_source" field="owner"/>
7155                 </retrieve>
7156                                 <update permission="ADMIN_FUNDING_SOURCE">
7157                     <context link="funding_source" field="owner"/>
7158                 </update>
7159                                 <delete permission="ADMIN_FUNDING_SOURCE">
7160                     <context link="funding_source" field="owner"/>
7161                 </delete>
7162                         </actions>
7163                 </permacrud>
7164         </class>
7165
7166         <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">
7167                 <fields oils_persist:primary="id">
7168                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7169                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7170                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7171                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7172                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7173                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7174                 </fields>
7175                 <links>
7176                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7177                 </links>
7178         </class>
7179
7180         <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">
7181                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7182                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7183                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7184                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7185                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7186                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7187                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7188                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7189                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7190                 </fields>
7191                 <links>
7192                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7193                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7194                 </links>
7195                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7196                         <actions>
7197                                 <create permission="ADMIN_ACQ_FUND">
7198                     <context link="fund" field="org"/>
7199                 </create>
7200                                 <retrieve permission="ADMIN_ACQ_FUND">
7201                     <context link="fund" field="org"/>
7202                 </retrieve>
7203                                 <update permission="ADMIN_ACQ_FUND">
7204                     <context link="fund" field="org"/>
7205                 </update>
7206                                 <delete permission="ADMIN_ACQ_FUND">
7207                     <context link="fund" field="org"/>
7208                 </delete>
7209                         </actions>
7210                 </permacrud>
7211         </class>
7212
7213         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7214                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7215                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7216                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7217                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7218                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7219                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7220                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7221                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7222                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7223                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7224                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7225                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7226                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7227                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7228                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7229                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7230                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7231                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7232                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7233                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7234                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7235                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7236                 </fields>
7237                 <links>
7238                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7239                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7240             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7241             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7242             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7243             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7244             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7245             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7246             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7247             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7248             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7249                 </links>
7250         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7251             <actions>
7252                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7253                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7254                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7255                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7256             </actions>
7257         </permacrud>
7258         </class>
7259
7260         <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">
7261                 <fields oils_persist:primary="fund">
7262                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7263                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7264                 </fields>
7265                 <links>
7266                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7267                 </links>
7268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7269             <actions>
7270                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7271                                         <context link="fund" field="org" />
7272                 </retrieve>
7273             </actions>
7274         </permacrud>
7275         </class>
7276
7277         <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">
7278                 <fields oils_persist:primary="fund">
7279                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7280                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
7281                 </fields>
7282                 <links>
7283                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7284                 </links>
7285         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7286             <actions>
7287                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7288                                         <context link="fund" field="org" />
7289                 </retrieve>
7290             </actions>
7291         </permacrud>
7292         </class>
7293
7294         <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">
7295                 <fields oils_persist:primary="fund">
7296                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7297                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
7298                 </fields>
7299                 <links>
7300                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7301                 </links>
7302         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7303             <actions>
7304                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7305                                         <context link="fund" field="org" />
7306                 </retrieve>
7307             </actions>
7308         </permacrud>
7309         </class>
7310
7311         <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">
7312                 <fields oils_persist:primary="fund">
7313                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7314                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7315                 </fields>
7316                 <links>
7317                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7318                 </links>
7319         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7320             <actions>
7321                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7322                                         <context link="fund" field="org" />
7323                 </retrieve>
7324             </actions>
7325         </permacrud>
7326         </class>
7327
7328         <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">
7329                 <fields oils_persist:primary="fund">
7330                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7331                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
7332                 </fields>
7333                 <links>
7334                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7335                 </links>
7336         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7337             <actions>
7338                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7339                                         <context link="fund" field="org" />
7340                 </retrieve>
7341             </actions>
7342         </permacrud>
7343         </class>
7344
7345    <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">
7346         <fields oils_persist:primary="fund">
7347             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7348             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7349         </fields>
7350         <links>
7351             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7352         </links>
7353     </class>
7354
7355    <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">
7356         <fields oils_persist:primary="fund">
7357             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7358             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
7359         </fields>
7360         <links>
7361             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7362         </links>
7363     </class>
7364
7365    <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">
7366         <fields oils_persist:primary="fund">
7367             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7368             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
7369         </fields>
7370         <links>
7371             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7372         </links>
7373     </class>
7374
7375    <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">
7376         <fields oils_persist:primary="fund">
7377             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7378             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
7379         </fields>
7380         <links>
7381             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7382         </links>
7383     </class>
7384
7385    <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">
7386         <fields oils_persist:primary="fund">
7387             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7388             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
7389         </fields>
7390         <links>
7391             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7392         </links>
7393     </class>
7394
7395         <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">
7396                 <fields oils_persist:primary="funding_source">
7397                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7398                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
7399                 </fields>
7400                 <links>
7401                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7402                 </links>
7403         </class>
7404
7405         <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">
7406                 <fields oils_persist:primary="funding_source">
7407                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7408                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
7409                 </fields>
7410                 <links>
7411                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7412                 </links>
7413         </class>
7414
7415         <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">
7416                 <fields oils_persist:primary="funding_source">
7417                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7418                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
7419                 </fields>
7420                 <links>
7421                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7422                 </links>
7423         </class>
7424
7425         <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">
7426                 <fields oils_persist:primary="fund">
7427                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7428                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
7429                 </fields>
7430                 <links>
7431                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7432                 </links>
7433         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7434             <actions>
7435                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
7436                                         <context link="fund" field="org" />
7437                 </retrieve>
7438             </actions>
7439         </permacrud>
7440     </class>
7441     <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">
7442         <oils_persist:source_definition><![CDATA[
7443             SELECT
7444                 acqf.*,
7445                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
7446                 COALESCE(acqfst.amount, 0.00) AS spent_total,
7447                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
7448                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
7449             FROM
7450                 acq.fund acqf
7451                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
7452                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
7453                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
7454                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
7455         ]]></oils_persist:source_definition>
7456         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7457             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7458             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7459             <field reporter:label="Name" name="name" reporter:datatype="text" />
7460             <field reporter:label="Year" name="year" reporter:datatype="int" />
7461             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7462             <field reporter:label="Code" name="code" reporter:datatype="text" />
7463             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7464             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7465             <field reporter:label="Active" name="active" reporter:datatype="bool" />
7466             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7467             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7468
7469             <!-- non fund-native fields -->
7470             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
7471             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
7472             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
7473             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
7474         </fields>
7475         <links>
7476             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
7477             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7478             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7479         </links>
7480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7481             <actions>
7482                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7483             </actions>
7484         </permacrud>
7485         </class>
7486         <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">
7487                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
7488                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7489                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7490                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7491                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7492                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7493                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7494                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7495                 </fields>
7496                 <links>
7497                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7498                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7499                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7500                 </links>
7501                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7502                         <actions>
7503                                 <create permission="ADMIN_ACQ_FUND">
7504                     <context link="fund" field="org"/>
7505                 </create>
7506                                 <retrieve permission="ADMIN_ACQ_FUND">
7507                     <context link="fund" field="org"/>
7508                 </retrieve>
7509                                 <update permission="ADMIN_ACQ_FUND">
7510                     <context link="fund" field="org"/>
7511                 </update>
7512                                 <delete permission="ADMIN_ACQ_FUND">
7513                     <context link="fund" field="org"/>
7514                 </delete>
7515                         </actions>
7516                 </permacrud>
7517         </class>
7518
7519     <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">
7520         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
7521             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
7522             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
7523             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7524             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
7525             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
7526             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
7527             <field reporter:label="Note" name="note" reporter:datatype="text" />
7528             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7529         </fields>
7530         <links>
7531             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
7532             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7533             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7534         </links>
7535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7536                         <actions>
7537                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7538                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7539                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7540                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
7541                         </actions>
7542                 </permacrud>
7543     </class>
7544
7545         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
7546                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
7547                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
7548                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7549                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
7550                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7551                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7552                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7553                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
7554                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
7555                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7556                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7557                 </fields>
7558                 <links>
7559                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7560                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7561                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7562                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7563                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
7564                 </links>
7565                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7566                         <actions>
7567                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
7568                         </actions>
7569                 </permacrud>
7570         </class>
7571
7572         <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">
7573                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
7574                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7575                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
7576                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
7577                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7578                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
7579                 </fields>
7580                 <links>
7581                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
7582                 </links>
7583                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7584                         <actions>
7585                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7586                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
7587                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7588                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
7589                         </actions>
7590                 </permacrud>
7591         </class>
7592
7593         <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">
7594                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
7595                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7596                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
7597                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7598                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7599                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7600                         <field reporter:label="State" name="state" reporter:datatype="text" />
7601                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
7602                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7603                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7604                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
7605                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7606                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7607                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7608                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
7609                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7610                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
7611                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
7612                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
7613                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
7614                 </fields>
7615                 <links>
7616                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7617                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7618                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7619                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
7620                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7621                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
7622                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
7623                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
7624                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7625                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7626                 </links>
7627                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7628                         <actions>
7629                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7630                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7631                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7632                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
7633                         </actions>
7634                 </permacrud>
7635         </class>
7636
7637         <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">
7638                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
7639                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7640                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7641                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7642                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
7643                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
7644                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7645                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7646                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
7647                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7648                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7649                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7650                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7651                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
7652                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7653                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7654                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7655                 </fields>
7656                 <links>
7657                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
7658                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
7659                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7660                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7661                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
7662                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7663                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7664                 </links>
7665                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7666             <actions>
7667                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
7668             </actions>
7669                 </permacrud>
7670         </class>
7671
7672         <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">
7673                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
7674                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7675                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7676                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7677                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7678                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7679                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7680                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
7681                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7682                 </fields>
7683                 <links>
7684                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7685                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7686                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7687                 </links>
7688                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7689             <actions>
7690                 <create permission="CREATE_PURCHASE_ORDER">
7691                     <context link="purchase_order" field="ordering_agency"/>
7692                 </create>
7693                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7694                     <context link="purchase_order" field="ordering_agency"/>
7695                 </retrieve>
7696                 <update permission="CREATE_PURCHASE_ORDER">
7697                     <context link="purchase_order" field="ordering_agency"/>
7698                 </update>
7699                 <delete permission="CREATE_PURCHASE_ORDER">
7700                     <context link="purchase_order" field="ordering_agency"/>
7701                 </delete>
7702             </actions>
7703                 </permacrud>
7704         </class>
7705
7706         <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">
7707                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
7708                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7709                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7710                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7711                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
7712                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
7713                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
7714                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7715                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
7716                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
7717                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7718                 </fields>
7719                 <links>
7720                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7721                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7722                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7723                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7724                 </links>
7725                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7726             <actions>
7727                 <create permission="CREATE_PURCHASE_ORDER">
7728                     <context link="purchase_order" field="ordering_agency"/>
7729                 </create>
7730                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7731                     <context link="purchase_order" field="ordering_agency"/>
7732                 </retrieve>
7733                 <update permission="CREATE_PURCHASE_ORDER">
7734                     <context link="purchase_order" field="ordering_agency"/>
7735                 </update>
7736                 <delete permission="CREATE_PURCHASE_ORDER">
7737                     <context link="purchase_order" field="ordering_agency"/>
7738                 </delete>
7739             </actions>
7740                 </permacrud>
7741         </class>
7742
7743         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
7744                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
7745                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
7746                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
7747                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
7748                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
7749                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7750                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7751                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7752                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
7753                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
7754                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
7755                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
7756                         <field reporter:label="State" name="state" reporter:datatype="text" />
7757                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7758                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7759                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
7760                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7761                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7762                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7763                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
7764                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
7765                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
7766                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
7767                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
7768                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
7769                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
7770                 </fields>
7771                 <links>
7772                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7773                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7774                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7775                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7776                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7777                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7778                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7779                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
7780                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
7781                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
7782                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7783                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
7784                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7785                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
7786                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
7787                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7788                 </links>
7789                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7790                         <actions>
7791                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
7792                                         <context link="purchase_order" field="ordering_agency"/>
7793                                         <context link="picklist" field="org_unit"/>
7794                                 </retrieve>
7795                         </actions>
7796                 </permacrud>
7797         </class>
7798
7799         <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">
7800                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
7801                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
7802                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
7803                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
7804                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
7805                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
7806                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
7807                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
7808                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7809                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7810                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
7811                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
7812                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
7813                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
7814                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
7815                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
7816                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
7817                         <field reporter:label="State" name="state" reporter:datatype="text"/>
7818                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
7819                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
7820                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
7821                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
7822                 </fields>
7823                 <links>
7824                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
7825                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7826                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7827                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
7828                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7829                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7830                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
7831                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
7832                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7833                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
7834                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
7835                 </links>
7836                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7837                         <actions>
7838                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
7839                                         <context link="purchase_order" field="ordering_agency"/>
7840                                         <context link="picklist" field="org_unit"/>
7841                                 </retrieve>
7842                         </actions>
7843                 </permacrud>
7844         </class>
7845
7846         <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">
7847                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
7848                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
7849                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
7850                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
7851                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
7852                 </fields>
7853                 <links>
7854                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7855                 </links>
7856                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7857                         <actions>
7858                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7859                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
7860                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7861                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
7862                         </actions>
7863                 </permacrud>
7864         </class>
7865
7866         <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">
7867                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
7868                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
7869                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
7870                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7871                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7872                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7873                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7874                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7875                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
7876                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
7877                 </fields>
7878                 <links>
7879                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7880                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7881                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7882                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
7883                 </links>
7884         </class>
7885
7886         <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">
7887                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
7888                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
7889                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
7890                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
7891                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
7892                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
7893                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
7894                 </fields>
7895                 <links>
7896                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7897                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
7898                 </links>
7899         </class>
7900
7901         <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">
7902                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
7903                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
7904                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7905                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
7906                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
7907                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
7908                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
7909                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
7910                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7911                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
7912                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
7913                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link" />
7914                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
7915                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7916                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
7917                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7918                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
7919                 </fields>
7920                 <links>
7921                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7922                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
7923                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7924                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7925                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
7926                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
7927                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
7928                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7929                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
7930                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
7931                 </links>
7932         </class>
7933
7934         <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">
7935                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7936                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7937                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7938                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7939                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7940                 </fields>
7941                 <links/>
7942                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7943                         <actions>
7944                                 <retrieve />
7945                         </actions>
7946                 </permacrud>
7947         </class>
7948
7949         <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">
7950                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7951                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7952                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7953                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7954                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7955                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7956             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
7957                 </fields>
7958                 <links/>
7959         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7960             <actions>
7961                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7962                 <retrieve />
7963                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7964                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
7965             </actions>
7966         </permacrud>
7967         </class>
7968
7969         <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">
7970                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7971                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7972                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7973                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7974                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7975                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7976                 </fields>
7977                 <links/>
7978         </class>
7979         <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">
7980                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7981                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7982                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7983                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7984                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7985                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
7986                 </fields>
7987                 <links>
7988                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7989                 </links>
7990         </class>
7991
7992         <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">
7993             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
7994                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
7995                 <field reporter:label="Code" name="code" reporter:datatype="text" />
7996                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
7997                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
7998                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7999                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8000         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8001
8002             </fields>
8003             <links>
8004                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8005             </links>
8006             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8007                 <actions>
8008                     <create permission="ADMIN_PROVIDER">
8009                         <context link="provider" field="owner"/>
8010                     </create>
8011                     <retrieve permission="ADMIN_PROVIDER">
8012                         <context link="provider" field="owner"/>
8013                     </retrieve>
8014                     <update permission="ADMIN_PROVIDER">
8015                         <context link="provider" field="owner"/>
8016                     </update>
8017                     <delete permission="ADMIN_PROVIDER">
8018                         <context link="provider" field="owner"/>
8019                     </delete>
8020                 </actions>
8021             </permacrud>
8022         </class>
8023         
8024         <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">
8025             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8026                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8027                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8028                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8029                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8030             </fields>
8031             <links>
8032                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8033             </links>
8034             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8035                 <actions>
8036                     <create permission="ADMIN_PROVIDER">
8037                         <context link="provider" field="owner"/>
8038                     </create>
8039                     <retrieve permission="ADMIN_PROVIDER">
8040                         <context link="provider" field="owner"/>
8041                     </retrieve>
8042                     <update permission="ADMIN_PROVIDER">
8043                         <context link="provider" field="owner"/>
8044                     </update>
8045                     <delete permission="ADMIN_PROVIDER">
8046                         <context link="provider" field="owner"/>
8047                     </delete>
8048                 </actions>
8049             </permacrud>
8050         </class>
8051         
8052         <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">
8053             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8054                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8055                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8056                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8057                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8058                 </fields>
8059                 <links/>
8060         </class>
8061
8062         <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">
8063                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8064                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8065                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8066                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8067                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8068                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8069                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8070                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8071                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8072                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8073                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8074                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8075                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8076                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8077                 </fields>
8078                 <links>
8079                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8080                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8081                 </links>
8082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8083             <actions>
8084                 <create permission="ADMIN_PROVIDER">
8085                     <context link="provider" field="owner"/>
8086                 </create>
8087                 <retrieve permission="ADMIN_PROVIDER">
8088                     <context link="provider" field="owner"/>
8089                 </retrieve>
8090                 <update permission="ADMIN_PROVIDER">
8091                     <context link="provider" field="owner"/>
8092                 </update>
8093                 <delete permission="ADMIN_PROVIDER">
8094                     <context link="provider" field="owner"/>
8095                 </delete>
8096             </actions>
8097         </permacrud>
8098         </class>
8099
8100         <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">
8101                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8102                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8103                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8104                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8105                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8106                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8107                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8108                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8109                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8110                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8111                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8112                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8113                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8114                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8115                 </fields>
8116                 <links>
8117                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8118                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8119                 </links>
8120         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8121             <actions>
8122                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8123                     <context link="account" jump="provider" field="owner"/>
8124                 </retrieve>
8125                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8126                     <context link="account" jump="provider" field="owner"/>
8127                 </update>
8128                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8129                     <context link="account" jump="provider" field="owner"/>
8130                 </delete>
8131             </actions>
8132         </permacrud>
8133         </class>
8134
8135
8136         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8137                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8138                         <field name="id" reporter:datatype="id" />
8139                         <field name="parent" reporter:datatype="link"/>
8140                         <field name="owner" reporter:datatype="link"/>
8141                         <field name="create_time" reporter:datatype="timestamp"/>
8142                         <field name="name" reporter:datatype="text"/>
8143                         <field name="shared" reporter:datatype="bool"/>
8144                         <field name="share_with" reporter:datatype="link"/>
8145                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8146                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8147                 </fields>
8148                 <links>
8149                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8150                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8151                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8152                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8153                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8154                 </links>
8155         </class>
8156         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8157                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8158                         <field name="id" reporter:datatype="id" />
8159                         <field name="parent" reporter:datatype="link"/>
8160                         <field name="owner" reporter:datatype="link"/>
8161                         <field name="create_time" reporter:datatype="timestamp"/>
8162                         <field name="name" reporter:datatype="text"/>
8163                         <field name="shared" reporter:datatype="bool"/>
8164                         <field name="share_with" reporter:datatype="link"/>
8165                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8166                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8167                 </fields>
8168                 <links>
8169                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8170                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8171                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8172                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8173                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8174                 </links>
8175         </class>
8176         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8177                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8178                         <field name="id" reporter:datatype="id" />
8179                         <field name="parent" reporter:datatype="link"/>
8180                         <field name="owner" reporter:datatype="link"/>
8181                         <field name="create_time" reporter:datatype="timestamp"/>
8182                         <field name="name" reporter:datatype="text"/>
8183                         <field name="shared" reporter:datatype="bool"/>
8184                         <field name="share_with" reporter:datatype="link"/>
8185                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8186                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8187                 </fields>
8188                 <links>
8189                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8190                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8191                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8192                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8193                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8194                 </links>
8195         </class>
8196         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8197                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8198                         <field name="id" reporter:datatype="id" />
8199                         <field name="owner" reporter:datatype="link"/>
8200                         <field name="create_time" reporter:datatype="timestamp"/>
8201                         <field name="name" reporter:datatype="text"/>
8202                         <field name="data" reporter:datatype="text"/>
8203                         <field name="folder" reporter:datatype="link"/>
8204                         <field name="description" reporter:datatype="text"/>
8205                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8206                 </fields>
8207                 <links>
8208                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8209                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8210                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8211                 </links>
8212         </class>
8213         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8214                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8215                         <field name="id" reporter:datatype="id" />
8216                         <field name="owner" reporter:datatype="link"/>
8217                         <field name="create_time" reporter:datatype="timestamp"/>
8218                         <field name="template" reporter:datatype="link"/>
8219                         <field name="data" reporter:datatype="text"/>
8220                         <field name="folder" reporter:datatype="link"/>
8221                         <field name="recur" reporter:datatype="bool"/>
8222                         <field name="recurrence" reporter:datatype="interval"/>
8223                         <field name="name" reporter:datatype="text"/>
8224                         <field name="description" reporter:datatype="text"/>
8225                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8226                 </fields>
8227                 <links>
8228                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8229                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8230                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8231                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8232                 </links>
8233         </class>
8234         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8235                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8236                         <field name="id" reporter:datatype="id" />
8237                         <field name="runner" reporter:datatype="link"/>
8238                         <field name="start_time" reporter:datatype="timestamp"/>
8239                         <field name="complete_time" reporter:datatype="timestamp"/>
8240                         <field name="run_time" reporter:datatype="timestamp"/>
8241                         <field name="email" reporter:datatype="text"/>
8242                         <field name="excel_format" reporter:datatype="bool"/>
8243                         <field name="csv_format" reporter:datatype="bool"/>
8244                         <field name="html_format" reporter:datatype="bool"/>
8245                         <field name="error_code" reporter:datatype="int"/>
8246                         <field name="error_text" reporter:datatype="text"/>
8247                         <field name="report" reporter:datatype="link"/>
8248                         <field name="folder" reporter:datatype="link"/>
8249                         <field name="chart_pie" reporter:datatype="bool"/>
8250                         <field name="chart_bar" reporter:datatype="bool"/>
8251                         <field name="chart_line" reporter:datatype="bool"/>
8252                 </fields>
8253                 <links>
8254                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8255                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8256                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8257                 </links>
8258         </class>
8259         <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">
8260                 <fields oils_persist:primary="id">
8261                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8262                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8263                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8264                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8265                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8266                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8267                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8268                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8269                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8270                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8271                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8272                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8273                 </fields>
8274                 <links>
8275                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8276                 </links>
8277                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8278                         <actions>
8279                                 <retrieve />
8280                         </actions>
8281                 </permacrud>
8282         </class>
8283         <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">
8284                 <fields oils_persist:primary="id">
8285                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8286                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8287                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8288                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8289                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8290                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8291                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8292                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8293                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8294                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8295                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8296                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8297                 </fields>
8298                 <links>
8299                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8300                 </links>
8301         </class>
8302         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
8303                 <fields oils_persist:primary="id">
8304                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8305                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
8306                         <field reporter:label="Fingerprint" name="fingerprint" />
8307                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8308                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8309                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8310                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8311                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
8312                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8313                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
8314                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
8315                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
8316                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
8317                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
8318                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
8319                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
8320                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
8321                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
8322                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
8323                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
8324                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
8325                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
8326                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
8327                 </fields>
8328                 <links>
8329                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
8330                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
8331                 </links>
8332         </class>
8333         <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">
8334                 <fields oils_persist:primary="id">
8335                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
8336                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
8337                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
8338                 </fields>
8339                 <links>
8340                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
8341                 </links>
8342         </class>
8343         <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">
8344                 <fields oils_persist:primary="id">
8345                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
8346                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
8347                 </fields>
8348                 <links>
8349                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
8350                 </links>
8351         </class>
8352         <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">
8353                 <fields oils_persist:primary="id">
8354                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
8355                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
8356                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
8357                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
8358                 </fields>
8359                 <links>
8360                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
8361                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
8362                 </links>
8363         </class>
8364         <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">
8365                 <fields oils_persist:primary="xact">
8366                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8367                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
8368                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
8369                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
8370                 </fields>
8371                 <links>
8372                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8373                 </links>
8374         </class>
8375         <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">
8376                 <fields oils_persist:primary="xact">
8377                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
8378                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
8379                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
8380                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
8381                 </fields>
8382                 <links>
8383                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
8384                 </links>
8385         </class>
8386         <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)">
8387                 <fields oils_persist:primary="id">
8388                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
8389                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
8390                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
8391                 </fields>
8392                 <links>
8393                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
8394                 </links>
8395         </class>
8396         <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">
8397                 <fields oils_persist:primary="id">
8398                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
8399                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
8400                 </fields>
8401                 <links>
8402                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
8403                 </links>
8404         </class>
8405         <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">
8406                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
8407                         <field reporter:label="Formula ID" name="id" reporter:datatype="id"/>
8408                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
8409                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
8410                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
8411                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
8412                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
8413                 </fields>
8414                 <links>
8415                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8416                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
8417                 </links>
8418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8419                         <actions>
8420                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8421                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8422                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8423                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
8424                         </actions>
8425                 </permacrud>
8426         </class>
8427         <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">
8428                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
8429                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
8430                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
8431                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
8432                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
8433                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
8434                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
8435                 </fields>
8436                 <links>
8437                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8438                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8439                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8440                 </links>
8441                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8442                         <actions>
8443                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
8444                                         <context link="formula" field="owner"/>
8445                                 </create>
8446                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
8447                                         <context link="formula" field="owner"/>
8448                                 </retrieve>
8449                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
8450                                         <context link="formula" field="owner"/>
8451                                 </update>
8452                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
8453                                         <context link="formula" field="owner"/>
8454                                 </delete>
8455                         </actions>
8456                 </permacrud>
8457         </class>
8458
8459         <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">
8460                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
8461                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8462                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8463                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8464                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
8465                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
8466                 </fields>
8467                 <links>
8468                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8469                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
8470                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8471                 </links>
8472                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8473                         <actions>
8474                                 <create permission="CREATE_PURCHASE_ORDER">
8475                                         <context link="formula" field="owner"/>
8476                 </create>
8477                                 <retrieve permission="CREATE_PURCHASE_ORDER">
8478                                         <context link="formula" field="owner"/>
8479                 </retrieve>
8480                                 <update permission="CREATE_PURCHASE_ORDER">
8481                                         <context link="formula" field="owner"/>
8482                 </update>
8483                                 <delete permission="CREATE_PURCHASE_ORDER">
8484                                         <context link="formula" field="owner"/>
8485                 </delete>
8486                         </actions>
8487                 </permacrud>
8488         </class>
8489
8490         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
8491                 <fields oils_persist:primary="id">
8492                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
8493                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8494                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
8495                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
8496                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
8497                 </fields>
8498                 <links>
8499                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8500                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
8501                 </links>
8502         </class>
8503
8504         <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">
8505                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
8506                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8507                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8508                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8509                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8510                 </fields>
8511                 <links>
8512                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8513                 </links>
8514                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8515                         <actions>
8516                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8517                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8518                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8519                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
8520                         </actions>
8521                 </permacrud>
8522         </class>
8523
8524         <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">
8525                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
8526                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
8527                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8528                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8529                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8530                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
8531                 </fields>
8532                 <links>
8533                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8534                 </links>
8535                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8536                         <actions>
8537                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8538                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
8539                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8540                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
8541                         </actions>
8542                 </permacrud>
8543         </class>
8544
8545         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
8546                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
8547                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8548                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8549                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
8550                 </fields>
8551                 <links>
8552                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8553                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
8554                 </links>
8555         </class>
8556
8557         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
8558                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
8559                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8560                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8561                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8562                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8563                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8564                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8565                 </fields>
8566                 <links>
8567                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8568                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
8569                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8570                 </links>
8571         </class>
8572
8573         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
8574                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
8575                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
8576                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
8577                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
8578                 </fields>
8579                 <links>
8580                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
8581                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
8582                 </links>
8583         </class>
8584
8585         <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">
8586                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
8587                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
8588                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
8589                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
8590                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
8591                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8592                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8593                 </fields>
8594                 <links>
8595                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
8596                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
8597                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8598                 </links>
8599         </class>
8600
8601         <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">
8602                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
8603                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
8604                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
8605                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
8606                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8607                 </fields>
8608                 <links>
8609                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8610                 </links>
8611                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8612             <actions>
8613                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8614                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
8615                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8616                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
8617             </actions>
8618                 </permacrud>
8619         </class>
8620
8621         <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">
8622                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
8623                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
8624                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
8625                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
8626                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
8627                 </fields>
8628                 <links>
8629                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8630                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
8631                 </links>
8632                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8633                         <actions>
8634                                 <create permission="ADMIN_CLAIM_POLICY">
8635                                         <context link="claim_policy" field="org_unit"/>
8636                 </create>
8637                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
8638                                         <context link="claim_policy" field="org_unit"/>
8639                 </retrieve>
8640                                 <update permission="ADMIN_CLAIM_POLICY">
8641                                         <context link="claim_policy" field="org_unit"/>
8642                 </update>
8643                                 <delete permission="ADMIN_CLAIM_POLICY">
8644                                         <context link="claim_policy" field="org_unit"/>
8645                 </delete>
8646                         </actions>
8647                 </permacrud>
8648         </class>
8649
8650     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
8651         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.usr_stage_row_id_seq">
8652             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8653             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8654             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8655             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
8656             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
8657             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
8658             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
8659             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
8660             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
8661             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
8662             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
8663             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
8664             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
8665             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
8666             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8667         </fields>
8668     </class>
8669
8670     <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">
8671         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
8672             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8673             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8674             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8675             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
8676             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8677         </fields>
8678     </class>
8679
8680     <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">
8681         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
8682             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8683             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8684             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8685             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8686             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8687             <field reporter:label="City" name="city" reporter:datatype="text"/>
8688             <field reporter:label="State" name="state" reporter:datatype="text"/>
8689             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8690             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8691             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8692         </fields>
8693     </class>
8694
8695     <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">
8696         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.billing_address_stage_row_id_seq">
8697             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8698             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8699             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8700             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
8701             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
8702             <field reporter:label="City" name="city" reporter:datatype="text"/>
8703             <field reporter:label="State" name="state" reporter:datatype="text"/>
8704             <field reporter:label="Country" name="country" reporter:datatype="text"/>
8705             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
8706             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8707         </fields>
8708     </class>
8709
8710     <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">
8711         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
8712             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
8713             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
8714             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
8715             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
8716             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
8717             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
8718         </fields>
8719     </class>
8720
8721         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
8722                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
8723                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
8724                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8725                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8726                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
8727                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
8728                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
8729                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
8730                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
8731                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
8732                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
8733                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
8734                 </fields>
8735                 <links>
8736                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8737                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8738                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
8739                 </links>
8740         </class>
8741
8742         <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">
8743                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
8744                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
8745                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
8746                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
8747                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
8748                 </fields>
8749                 <links>
8750                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
8751                 </links>
8752         </class>
8753
8754     <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">
8755         <fields>
8756             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8757             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8758             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8759         </fields>
8760                 <links>
8761                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8762                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8763                 </links>
8764     </class>
8765
8766     <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">
8767         <fields>
8768             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8769             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
8770         </fields>
8771                 <links>
8772                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8773                 </links>
8774     </class>
8775
8776     <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">
8777         <fields>
8778             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8779             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8780             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8781         </fields>
8782                 <links>
8783                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8784                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8785                 </links>
8786     </class>
8787
8788     <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">
8789         <fields>
8790             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8791             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
8792         </fields>
8793                 <links>
8794                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8795                 </links>
8796     </class>
8797
8798     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
8799                 <oils_persist:source_definition>
8800
8801             SELECT  DISTINCT l.*
8802               FROM  action.unfulfilled_hold_loops l
8803                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
8804               WHERE l.count = m.max
8805
8806                 </oils_persist:source_definition>
8807         <fields>
8808             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
8809             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
8810             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
8811         </fields>
8812                 <links>
8813                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
8814                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
8815                 </links>
8816     </class>
8817
8818         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
8819                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
8820                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
8821                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
8822                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
8823                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
8824                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
8825                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
8826                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
8827                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
8828                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
8829                 </fields>
8830                 <links>
8831                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
8832                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
8833                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
8834                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
8835                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
8836                 </links>
8837         </class>
8838
8839         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
8840                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
8841                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
8842                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
8843                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8844                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
8845                 </fields>
8846                 <links>
8847                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
8848                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
8849                 </links>
8850         </class>
8851
8852         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
8853                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
8854                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
8855                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
8856                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
8857                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
8858                 </fields>
8859                 <links>
8860                 </links>
8861         </class>
8862
8863         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
8864                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
8865                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
8866                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
8867                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8868                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
8869                 </fields>
8870                 <links>
8871                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
8872                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
8873                 </links>
8874         </class>
8875         
8876         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
8877                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
8878                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
8879                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
8880                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
8881                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
8882                 </fields>
8883                 <links>
8884                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
8885                 </links>
8886         </class>
8887         
8888         <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">
8889                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
8890                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
8891                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8892                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8893                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
8894                 </fields>
8895                 <links>
8896                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8897                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
8898                 </links>
8899         </class>
8900
8901         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
8902                 <fields oils_persist:primary="name">
8903                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
8904                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8905                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
8906                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8907                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
8908                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
8909                 </fields>
8910                 <links>
8911                 </links>
8912         </class>
8913
8914         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
8915                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
8916                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
8917                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
8918                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
8919                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8920                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8921                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
8922                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8923                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8924                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
8925                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
8926                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
8927                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
8928                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
8929                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
8930                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
8931                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
8932                 </fields>
8933                 <links>
8934                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8935                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
8936                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
8937                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
8938                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8939                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
8940                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
8941                 </links>
8942         </class>
8943
8944         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
8945                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
8946                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
8947                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
8948                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8949                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
8950                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
8951                 </fields>
8952                 <links>
8953                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
8954                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
8955                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
8956                 </links>
8957         </class>
8958
8959         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
8960                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
8961                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
8962                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
8963                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
8964                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
8965                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
8966                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
8967                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
8968                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
8969                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8970                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
8971                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
8972                 </fields>
8973                 <links>
8974                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
8975                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
8976                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
8977                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
8978                 </links>
8979         </class>
8980
8981         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
8982                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
8983                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
8984                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
8985                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
8986                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
8987                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
8988                 </fields>
8989                 <links>
8990                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
8991                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
8992                 </links>
8993         </class>
8994
8995         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
8996                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
8997                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
8998                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
8999                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9000                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9001                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9002                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9003                 </fields>
9004                 <links>
9005                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9006                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9007                 </links>
9008         </class>
9009
9010         <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">
9011                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9012                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9013                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9014                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9015                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9016                 </fields>
9017                 <links>
9018                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9019                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9020                 </links>
9021         </class>
9022
9023         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9024                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9025                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9026                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9027                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9028                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9029                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9030                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9031                 </fields>
9032                 <links>
9033                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9034                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9035                 </links>
9036         </class>
9037
9038         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9039                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9040                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9041                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9042                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9043                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9044                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9045                 </fields>
9046                 <links>
9047                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9048                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9049                 </links>
9050         </class>
9051
9052         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9053                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9054                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9055                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9056                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9057                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9058                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9059                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9060                 </fields>
9061                 <links>
9062                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9063                 </links>
9064         </class>
9065
9066         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9067                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9068                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9069                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9070                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9071                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9072                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9073                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9074                 </fields>
9075                 <links>
9076                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9077                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9078                 </links>
9079         </class>
9080
9081         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9082                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9083                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9084                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9085                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9086                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9087                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9088                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9089                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9090                 </fields>
9091                 <links>
9092                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9093                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9094                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9095                 </links>
9096         </class>
9097
9098         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9099                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9100                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9101                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9102                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9103                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9104                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9105                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9106                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9107                 </fields>
9108                 <links>
9109                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9110                 </links>
9111         </class>
9112
9113         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9114                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9115                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9116                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9117                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9118                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9119                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9120                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9121                 </fields>
9122                 <links>
9123                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9124                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9125                 </links>
9126         </class>
9127
9128         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9129                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9130                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9131                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9132                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9133                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9134                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9135                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9136                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9137                 </fields>
9138                 <links>
9139                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9140                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9141                 </links>
9142         </class>
9143
9144         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9145                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9146                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9147                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9148                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9149                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9150                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9151                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9152                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9153                 </fields>
9154                 <links>
9155                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9156                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9157                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9158                 </links>
9159         </class>
9160
9161         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9162                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9163                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9164                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9165                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9166                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9167                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9168                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9169                 </fields>
9170                 <links>
9171                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9172                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9173                 </links>
9174         </class>
9175
9176         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9177                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9178                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9179                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9180                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9181                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9182                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9183                 </fields>
9184                 <links>
9185                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9186                 </links>
9187         </class>
9188
9189         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9190                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9191                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9192                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9193                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9194                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9195                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9196                 </fields>
9197                 <links>
9198                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9199                 </links>
9200         </class>
9201
9202         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9203                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9204                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9205                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9206                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9207                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9208                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9209                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9210                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9211                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9212                 </fields>
9213                 <links>
9214                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9215                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9216                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9217                 </links>
9218         </class>
9219
9220         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9221                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9222                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9223                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9224                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9225                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9226                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9227                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9228                 </fields>
9229                 <links>
9230                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9231                 </links>
9232         </class>
9233
9234         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9235                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9236                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9237                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9238                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9239                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9240                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9241                 </fields>
9242                 <links>
9243                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9244                 </links>
9245         </class>
9246
9247         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9248                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9249                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9250                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9251                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9252                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9253                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9254                 </fields>
9255                 <links>
9256                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9257                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9258                 </links>
9259         </class>
9260
9261         <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">
9262                 <fields oils_persist:primary="id">
9263                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
9264                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
9265                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
9266                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
9267                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
9268                 </fields>
9269                 <links>
9270                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
9271                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9272                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
9273                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
9274                 </links>
9275         </class>
9276
9277         <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">
9278                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
9279                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9280                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
9281                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9282                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
9283                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9284                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9285                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
9286                 </fields>
9287                 <links/>
9288                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9289                         <actions>
9290                                 <retrieve/>
9291                         </actions>
9292                 </permacrud>
9293         </class>
9294
9295         <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">
9296                 <fields oils_persist:primary="ptype_key">
9297                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
9298                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9299                 </fields>
9300                 <links/>
9301                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9302                         <actions>
9303                                 <retrieve/>
9304                         </actions>
9305                 </permacrud>
9306         </class>
9307
9308         <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">
9309                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
9310                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9311                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
9312                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9313                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
9314                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
9315                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9316                 </fields>
9317                 <links>
9318                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
9319                 </links>
9320                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9321                         <actions>
9322                                 <retrieve/>
9323                         </actions>
9324                 </permacrud>
9325         </class>
9326
9327         <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">
9328                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
9329                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9330                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
9331                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
9332                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
9333                 </fields>
9334                 <links>
9335                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
9336                 </links>
9337                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9338                         <actions>
9339                                 <retrieve/>
9340                         </actions>
9341                 </permacrud>
9342         </class>
9343
9344     <class
9345         id="uvs"
9346         controller="open-ils.cstore open-ils.pcrud"
9347         oils_obj:fieldmapper="url_verify::session"
9348         oils_persist:tablename="url_verify.session"
9349         reporter:label="URL Verification Session"
9350     >
9351         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
9352             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
9353             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
9354                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
9355             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
9356             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
9357             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9358             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
9359             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
9360             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
9361         </fields>
9362
9363         <links>
9364             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9365             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9366             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
9367             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
9368             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
9369         </links>
9370
9371         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9372             <actions>
9373                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
9374             </actions>
9375         </permacrud>
9376
9377     </class>
9378
9379     <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">
9380         <oils_persist:source_definition>
9381             SELECT
9382                 cbrebi.id AS id,  -- so we can have a pkey in our view
9383                 uvs.id AS session,
9384                 uvs.owning_lib,
9385                 cbrebi.target_biblio_record_entry
9386             FROM url_verify.session uvs
9387             JOIN container.biblio_record_entry_bucket cbreb
9388                 ON (uvs.container = cbreb.id)
9389             JOIN container.biblio_record_entry_bucket_item cbrebi
9390                 ON (cbrebi.bucket = cbreb.id)
9391         </oils_persist:source_definition>
9392         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
9393             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
9394             <field reporter:label="Session" name="session" reporter:datatype="link" />
9395             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
9396             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
9397         </fields>
9398         <links>
9399             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
9400             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
9401             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
9402         </links>
9403         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9404             <actions>
9405                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
9406             </actions>
9407         </permacrud>
9408     </class>
9409
9410     <class
9411         id="uvus"
9412         controller="open-ils.cstore open-ils.pcrud"
9413         oils_obj:fieldmapper="url_verify::url_selector"
9414         oils_persist:tablename="url_verify.url_selector"
9415         reporter:label="URL Verification URL Selector"
9416     >
9417         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
9418             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
9419             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
9420                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9421             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
9422         </fields>
9423
9424         <links>
9425             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9426             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
9427         </links>
9428
9429         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9430             <actions>
9431                 <create permission="URL_VERIFY">
9432                     <context link="session" field="owning_lib"/>
9433                 </create>
9434                 <retrieve permission="URL_VERIFY">
9435                     <context link="session" field="owning_lib"/>
9436                 </retrieve>
9437                 <update permission="URL_VERIFY">
9438                     <context link="session" field="owning_lib"/>
9439                 </update>
9440                 <delete permission="URL_VERIFY">
9441                     <context link="session" field="owning_lib"/>
9442                 </delete>
9443             </actions>
9444         </permacrud>
9445
9446     </class>
9447
9448     <class
9449         id="uvu"
9450         controller="open-ils.cstore open-ils.pcrud"
9451         oils_obj:fieldmapper="url_verify::url"
9452         oils_persist:tablename="url_verify.url"
9453         reporter:label="URL Verification URL"
9454     >
9455         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
9456             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
9457                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
9458                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
9459                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
9460                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
9461             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
9462             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
9463             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
9464             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
9465             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
9466             <field reporter:label="Host" name="host" reporter:datatype="text"/>
9467             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
9468             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
9469             <field reporter:label="Path" name="path" reporter:datatype="text"/>
9470             <field reporter:label="Page" name="page" reporter:datatype="text"/>
9471             <field reporter:label="Query" name="query" reporter:datatype="text"/>
9472             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
9473             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
9474         </fields>
9475
9476         <links>
9477             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
9478             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
9479             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9480             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
9481             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
9482         </links>
9483
9484         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9485             <actions>
9486                 <create permission="URL_VERIFY">
9487                     <context link="session" field="owning_lib"/>
9488                 </create>
9489                 <retrieve permission="URL_VERIFY">
9490                     <context link="session" field="owning_lib"/>
9491                 </retrieve>
9492                 <update permission="URL_VERIFY">
9493                     <context link="session" field="owning_lib"/>
9494                 </update>
9495                 <delete permission="URL_VERIFY">
9496                     <context link="session" field="owning_lib"/>
9497                 </delete>
9498             </actions>
9499         </permacrud>
9500
9501     </class>
9502
9503     <class
9504         id="uvva"
9505         controller="open-ils.cstore open-ils.pcrud"
9506         oils_obj:fieldmapper="url_verify::verification_attempt"
9507         oils_persist:tablename="url_verify.verification_attempt"
9508         reporter:label="URL Verification Attempt"
9509     >
9510         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
9511             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
9512                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
9513                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
9514             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
9515             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
9516         </fields>
9517
9518         <links>
9519             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
9520             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
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="uvuv"
9544         controller="open-ils.cstore open-ils.pcrud"
9545         oils_obj:fieldmapper="url_verify::url_verification"
9546         oils_persist:tablename="url_verify.url_verification"
9547         reporter:label="URL Verification"
9548     >
9549         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
9550             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
9551                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
9552                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
9553             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
9554             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
9555             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
9556             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
9557                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
9558         </fields>
9559
9560         <links>
9561             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
9562             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
9563             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
9564         </links>
9565
9566         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9567             <actions>
9568                 <create permission="URL_VERIFY">
9569                     <context link="attempt" jump="session" field="owning_lib"/>
9570                 </create>
9571                 <retrieve permission="URL_VERIFY">
9572                     <context link="attempt" jump="session" field="owning_lib"/>
9573                 </retrieve>
9574                 <update permission="URL_VERIFY">
9575                     <context link="attempt" jump="session" field="owning_lib"/>
9576                 </update>
9577                 <delete permission="URL_VERIFY">
9578                     <context link="attempt" jump="session" field="owning_lib"/>
9579                 </delete>
9580             </actions>
9581         </permacrud>
9582
9583     </class>
9584
9585         <class
9586                 id="cfdi"
9587                 controller="open-ils.cstore open-ils.pcrud"
9588                 oils_obj:fieldmapper="config::filter_dialog_interface"
9589                 oils_persist:tablename="config.filter_dialog_interface"
9590                 reporter:label="FilterDialog Interface">
9591                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
9592                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
9593                         <field reporter:label="Description" name="description" reporter:datatype="text" />
9594                 </fields>
9595                 <links>
9596                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
9597                 </links>
9598                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9599                         <actions>
9600                                 <retrieve />
9601                         </actions>
9602                 </permacrud>
9603         </class>
9604
9605         <class
9606                 id="cfdfs"
9607                 controller="open-ils.cstore open-ils.pcrud"
9608                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
9609                 oils_persist:tablename="config.filter_dialog_filter_set"
9610                 reporter:label="FilterDialog Filter Set">
9611                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
9612                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9613                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
9614                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9615                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9616                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
9617                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9618                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
9619                 </fields>
9620                 <links>
9621                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9622                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9623                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
9624                 </links>
9625                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9626                         <actions>
9627                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9628                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9629                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9630                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
9631                         </actions>
9632                 </permacrud>
9633
9634         </class>
9635
9636         <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">
9637                 <fields oils_persist:primary="code">
9638                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
9639                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
9640                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
9641                 </fields>
9642                 <links/>
9643                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9644                         <actions>
9645                                 <retrieve/>
9646                         </actions>
9647                 </permacrud>
9648         </class>
9649
9650         <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">
9651                 <oils_persist:source_definition>
9652
9653             SELECT  b.id,
9654                     MAX(dcp.edit_date) AS last_delete_date
9655              FROM   biblio.record_entry b
9656                     JOIN asset.call_number cn ON (cn.record = b.id)
9657                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
9658              WHERE  NOT b.deleted
9659              GROUP BY b.id
9660              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
9661
9662                 </oils_persist:source_definition>
9663                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9664                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9665                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
9666                 </fields>
9667                 <links>
9668                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9669                 </links>
9670                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9671                         <actions>
9672                                 <retrieve/>
9673                         </actions>
9674                 </permacrud>
9675         </class>
9676
9677         <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">
9678                 <oils_persist:source_definition>
9679
9680             -- -- 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.
9681             -- -- 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
9682             -- -- may not.
9683             -- SELECT
9684             --     bre.id AS "bib_id",
9685             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
9686             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
9687             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
9688             -- FROM (
9689                 SELECT
9690                     y.bre AS "id",
9691                     COALESCE( x.copy_count, 0 ) AS "copy_count",
9692                     y.hold_count AS "hold_count",
9693                     (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"
9694                 FROM (
9695                         SELECT
9696                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
9697                             COUNT(*) AS "hold_count"
9698                         FROM action.hold_request h
9699                         WHERE
9700                             cancel_time IS NULL
9701                             AND fulfillment_time IS NULL
9702                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
9703                         GROUP BY 1
9704                     )y LEFT JOIN (
9705                         SELECT 
9706                             (SELECT id
9707                                 FROM biblio.record_entry 
9708                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number)
9709                             ) AS "bre", 
9710                             COUNT(*) AS "copy_count"
9711                         FROM asset.copy
9712                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
9713                         WHERE copy.holdable 
9714                             AND NOT copy.deleted 
9715                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
9716                         GROUP BY 1
9717                     )x ON x.bre = y.bre
9718                 -- )z RIGHT JOIN (
9719                 --     SELECT id
9720                 --     FROM biblio.record_entry
9721                 --     WHERE NOT deleted
9722                 -- )bre ON (z.bib_id = bre.id)
9723                 
9724
9725                 </oils_persist:source_definition>
9726                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9727                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
9728                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
9729                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
9730                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
9731                 </fields>
9732                 <links>
9733                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9734                 </links>
9735                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9736                         <actions>
9737                                 <retrieve/>
9738                         </actions>
9739                 </permacrud>
9740         </class>
9741
9742         <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">
9743                 <oils_persist:source_definition>
9744             SELECT *,
9745                 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,
9746                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
9747             FROM
9748                 (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
9749                     FROM
9750                         action.hold_request ahr
9751                         JOIN reporter.hold_request_record rhrr USING (id)
9752                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9753                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
9754                     WHERE
9755                         ahr.cancel_time IS NULL
9756                         AND ahr.fulfillment_time IS NULL
9757                     GROUP BY bib_record, pickup_lib
9758                 )x
9759                 JOIN
9760                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
9761                     FROM
9762                         action.hold_request ahr
9763                         JOIN reporter.hold_request_record rhrr USING (id)
9764                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
9765                     WHERE
9766                         ahr.cancel_time IS NULL
9767                         AND ahr.fulfillment_time IS NULL
9768                     GROUP BY bib_record
9769                 )y
9770                 USING (id)
9771                 </oils_persist:source_definition>
9772                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9773                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
9774                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
9775                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
9776                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
9777                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
9778                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
9779                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
9780                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
9781                 </fields>
9782                 <links>
9783                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9784                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
9785                 </links>
9786                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9787                         <actions>
9788                                 <retrieve/>
9789                         </actions>
9790                 </permacrud>
9791         </class>
9792
9793         <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">
9794                 <oils_persist:source_definition>
9795             SELECT
9796                 ac.id,
9797                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
9798                 MAX(actac.xact_start) AS last_circ
9799             FROM asset.copy ac
9800                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9801             GROUP BY ac.id
9802
9803             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
9804             --SELECT
9805             --    ac.id,
9806             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
9807             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
9808             --FROM asset.copy ac
9809             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
9810             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
9811             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
9812                 </oils_persist:source_definition>
9813                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
9814                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
9815                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
9816                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
9817                 </fields>
9818                 <links>
9819                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9820                 </links>
9821                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9822                         <actions>
9823                                 <retrieve/>
9824                         </actions>
9825                 </permacrud>
9826         </class>
9827
9828         <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">
9829                 <fields oils_persist:primary="id">
9830                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
9831                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
9832                 </fields>
9833                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9834                         <actions>
9835                                 <retrieve/>
9836                         </actions>
9837                 </permacrud>
9838         </class>
9839
9840         <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">
9841                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
9842                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9843                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
9844                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9845                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9846                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9847                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9848                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9849                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
9850                 </fields>
9851                 <links>
9852                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
9853                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9854                 </links>
9855                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9856                         <actions>
9857                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9858                                 <retrieve/>
9859                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9860                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9861                         </actions>
9862                 </permacrud>
9863         </class>
9864
9865         <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">
9866                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
9867                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
9868                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
9869                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
9870                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
9871                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
9872                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
9873                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
9874                 </fields>
9875                 <links>
9876                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
9877                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
9878                 </links>
9879                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9880                         <actions>
9881                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9882                                 <retrieve/>
9883                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9884                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
9885                         </actions>
9886                 </permacrud>
9887         </class>
9888
9889
9890         <!-- ********************************************************************************************************************* -->
9891         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
9892         <!-- ********************************************************************************************************************* -->
9893         <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">
9894                 <fields oils_persist:primary="id">
9895                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
9896                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
9897                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
9898                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9899                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
9900                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
9901                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
9902                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
9903                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
9904                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
9905                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
9906                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
9907                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
9908                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
9909                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9910                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
9911                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
9912                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
9913                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
9914                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
9915                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
9916                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
9917                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
9918                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
9919                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
9920                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
9921                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
9922                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
9923                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
9924                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
9925                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
9926                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
9927                 </fields>
9928                 <links>
9929                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
9930                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
9931                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
9932                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
9933                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
9934                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
9935                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
9936                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
9937                 </links>
9938         </class>
9939
9940         <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">
9941                 <fields oils_persist:primary="id">
9942                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9943                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9944                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9945                 </fields>
9946                 <links>
9947                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9948                 </links>
9949         </class>
9950
9951         <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">
9952                 <fields oils_persist:primary="id">
9953                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
9954                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
9955                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
9956                 </fields>
9957                 <links>
9958                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9959                 </links>
9960         </class>
9961
9962         <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">
9963                 <fields oils_persist:primary="id">
9964                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
9965
9966                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
9967                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
9968                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
9969
9970                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
9971                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
9972                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
9973
9974                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
9975                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
9976
9977                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
9978                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
9979                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
9980
9981                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
9982                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
9983
9984                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
9985                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
9986                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
9987
9988                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
9989                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
9990                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
9991
9992                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
9993                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
9994                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
9995                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
9996
9997                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
9998                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
9999
10000                 </fields>
10001                 <links>
10002                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10003                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10004                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10005                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10006                 </links>
10007         </class>
10008
10009         <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">
10010                 <oils_persist:source_definition>
10011
10012             SELECT
10013                 po.ordering_agency AS ordering_agency,
10014                 po.id AS purchase_order,
10015                 li.id AS lineitem,
10016                 lid.id AS lineitem_detail,
10017                 cpa.id AS claim_policy_action
10018             FROM
10019                 acq.lineitem_detail lid
10020                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10021                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10022                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10023                 JOIN acq.claim_policy_action cpa ON (
10024                     cpa.claim_policy = cp.id
10025
10026                     -- we only care about claim policy actions whose claim
10027                     -- interval we'd reached or exceeded
10028                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10029
10030                     -- filter out all claim policy actions where claim events
10031                     -- have occurred on or after the action's action_interval
10032                     AND NOT EXISTS (
10033                         SELECT 1
10034                         FROM
10035                             acq.claim_event evt
10036                             JOIN acq.claim claim ON (
10037                                 claim.id = evt.claim
10038                                 AND claim.lineitem_detail = lid.id
10039                             )
10040                         WHERE
10041                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10042                     )
10043                 )
10044             WHERE
10045                 lid.cancel_reason IS NULL
10046                 AND li.cancel_reason IS NULL -- belt/suspenders
10047                 AND po.cancel_reason IS NULL -- belt/suspenders
10048                 AND lid.recv_time IS NULL
10049                 AND po.state = 'on-order'
10050             ORDER BY 1, 2, 3, 4, 5
10051
10052                 </oils_persist:source_definition>
10053                 <fields>
10054                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10055                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10056                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10057                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10058                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10059                 </fields>
10060                 <links>
10061                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10062                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10063                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10064                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10065                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10066                 </links>
10067         </class>
10068         <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">
10069                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10070                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10071                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10072                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10073                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10074                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10075                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10076                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10077                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10078                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10079                 </fields>
10080                 <links>
10081                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10082                 </links>
10083     </class>
10084         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10085                 <oils_persist:source_definition>
10086             SELECT * FROM acq.lineitem_summary 
10087                                 WHERE item_count > (invoice_count + cancel_count)
10088         </oils_persist:source_definition>
10089                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10090                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10091                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10092                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10093                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10094                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10095                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10096                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10097                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10098                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10099                 </fields>
10100                 <links>
10101                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10102                 </links>
10103     </class>
10104         <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">
10105                 <oils_persist:source_definition>
10106
10107                         SELECT  t.*
10108                           FROM  action.transit_copy t
10109                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10110                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10111                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10112
10113                 </oils_persist:source_definition>
10114                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10115                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10116                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10117                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10118                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10119                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10120                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10121                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10122                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10123                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10124                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10125                 </fields>
10126                 <links>
10127                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10128                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10129                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10130                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10131                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10132                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10133                 </links>
10134         </class>
10135
10136     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10137                 <oils_persist:source_definition>
10138
10139         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10140                 SELECT
10141                         cp.id as copy,
10142                         COUNT(circ.id),
10143                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10144                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10145                 FROM
10146                         asset.copy cp
10147                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10148                 GROUP BY 1, 3, 4
10149                 UNION
10150                 SELECT
10151                         cp.id as copy,
10152                         COUNT(circ.id),
10153                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10154                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10155                 FROM
10156                         asset.copy cp
10157                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10158                 GROUP BY 1, 3, 4
10159                 UNION
10160                 SELECT
10161                         id as copy,
10162                         circ_count,
10163                         -1 AS year,
10164                         false as is_renewal
10165                 FROM
10166                         extend_reporter.legacy_circ_count
10167         )x GROUP BY 1, 3, 4
10168
10169                 </oils_persist:source_definition>
10170         <fields>
10171             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10172             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10173             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10174             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10175         </fields>
10176                 <links>
10177                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10178                 </links>
10179                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10180                         <actions>
10181                                 <retrieve/>
10182                         </actions>
10183                 </permacrud>
10184     </class>
10185
10186         <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">
10187                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10188                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10189                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10190                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10191                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10192                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10193                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10194                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10195                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10196                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10197                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10198                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10199                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10200                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10201                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10202                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10203                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10204                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10205                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10206                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10207                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10208                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10209                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10210                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10211                         <field reporter:label="Check Out Date/Time" name="xact_start" reporter:datatype="timestamp" />
10212                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10213                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10214                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10215                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10216                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10217                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10218                 </fields>
10219                 <links>
10220                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10221                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10222                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10223                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10224                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10225                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10226                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10227                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10228                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10229                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10230                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10231                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10232                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10233                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10234                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10235                 </links>
10236         </class>
10237
10238     <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">
10239         <fields oils_persist:primary="id">
10240             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10241             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10242             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="int"/>
10243             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10244             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10245             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10246             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10247             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10248             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10249             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10250             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10251             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10252             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="text"/>
10253             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="text"/>
10254             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10255             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10256             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
10257             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
10258             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
10259             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
10260             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
10261             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
10262             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10263             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
10264             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
10265             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
10266             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
10267             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
10268             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
10269             <field reporter:label="Status" name="status" reporter:datatype="link"/>
10270             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
10271             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
10272             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
10273             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
10274         </fields>
10275         <links>
10276             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10277             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10278             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10279             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
10280             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
10281         </links>
10282     </class>
10283
10284     <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">
10285         <fields oils_persist:primary="id">
10286             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10287             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10288             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10289             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10290         </fields>
10291         <links>
10292             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10293             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10294         </links>
10295     </class>
10296
10297     <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">
10298         <fields oils_persist:primary="owning_lib">
10299             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10300             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10301             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10302         </fields>
10303         <links>
10304             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10305         </links>
10306     </class>
10307
10308     <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">
10309         <fields oils_persist:primary="id">
10310             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10311             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10312             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10313             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10314             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10315         </fields>
10316         <links>
10317             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10318             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10319             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10320         </links>
10321     </class>
10322
10323     <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">
10324         <fields oils_persist:primary="circ_lib">
10325             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
10326             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10327             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10328             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10329         </fields>
10330         <links>
10331             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10332             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10333         </links>
10334     </class>
10335
10336     <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">
10337         <fields oils_persist:primary="id">
10338             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
10339             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10340             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10341             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
10342             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
10343         </fields>
10344         <links>
10345             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10346             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10347             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10348         </links>
10349     </class>
10350
10351     <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">
10352         <fields oils_persist:primary="home_ou">
10353             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
10354             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10355             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
10356             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
10357         </fields>
10358         <links>
10359             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10360             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
10361         </links>
10362     </class>
10363         <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">
10364                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
10365                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
10366                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
10367                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
10368                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
10369                 </fields>
10370                 <links>
10371                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10372                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
10373                 </links>
10374                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10375                         <actions>
10376                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10377                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
10378                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10379                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
10380                         </actions>
10381                 </permacrud>
10382         </class>
10383         <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">
10384                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
10385                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
10386                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
10387                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
10388                 </fields>
10389                 <links>
10390                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
10391                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
10392                         </links>
10393                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10394                 <actions>
10395                                 <create permission="ADMIN_ACQ_FUND_TAG">
10396                                         <context link="tag" field="owner"/>
10397                                 </create>
10398                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
10399                                         <context link="tag" field="owner"/>
10400                                 </retrieve>
10401                                 <update permission="ADMIN_ACQ_FUND_TAG">
10402                                         <context link="tag" field="owner"/>
10403                                 </update>
10404                                 <delete permission="ADMIN_ACQ_FUND_TAG">
10405                                         <context link="tag" field="owner"/>
10406                                 </delete>
10407                         </actions>
10408                 </permacrud>
10409         </class>
10410         <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">
10411                 <oils_persist:source_definition><![CDATA[
10412                 SELECT
10413                         poi.purchase_order AS purchase_order,
10414                         ii.invoice AS invoice,
10415                         NULL AS lineitem,
10416                         poi.id AS po_item,
10417                         NULL AS picklist
10418                 FROM
10419                         acq.po_item poi
10420                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
10421                 UNION SELECT
10422                         jub.purchase_order AS purchase_order,
10423                         ie.invoice AS invoice,
10424                         jub.id AS lineitem,
10425                         NULL AS po_item,
10426                         jub.picklist AS picklist
10427                 FROM
10428                         acq.lineitem jub
10429                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
10430                 UNION SELECT
10431                         ii.purchase_order AS purchase_order,
10432                         ii.invoice AS invoice,
10433                         NULL AS lineitem,
10434                         NULL AS po_item,
10435                         NULL AS picklist
10436                 FROM
10437                         acq.invoice_item ii
10438                 WHERE ii.po_item IS NULL
10439                 UNION SELECT
10440                         ie.purchase_order AS purchase_order,
10441                         ie.invoice AS invoice,
10442                         NULL AS lineitem,
10443                         NULL AS po_item,
10444                         NULL AS picklist
10445                 FROM
10446                         acq.invoice_entry ie
10447                 WHERE ie.lineitem IS NULL
10448                 UNION SELECT
10449                         NULL AS purchase_order,
10450                         NULL AS invoice,
10451                         jub.id AS lineitem,
10452                         NULL AS po_item,
10453                         jub.picklist AS picklist
10454                 FROM
10455                         acq.lineitem jub
10456                 WHERE jub.purchase_order IS NULL
10457                 ]]></oils_persist:source_definition>
10458                 <fields>
10459                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
10460                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
10461                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
10462                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
10463                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
10464                 </fields>
10465                 <links>
10466                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
10467                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
10468                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
10469                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
10470                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
10471                 </links>
10472         </class>
10473         <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">
10474                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
10475                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10476                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
10477                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
10478                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
10479                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
10480                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10481                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
10482                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
10483                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
10484                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
10485                 </fields>
10486                 <links>
10487                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
10488                 </links>
10489                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10490                         <actions>
10491                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10492                                 <retrieve/>
10493                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10494                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
10495                         </actions>
10496                 </permacrud>
10497         </class>
10498
10499         <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">
10500                 <fields oils_persist:primary="date_applied" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
10501                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10502                         <field name="date_applied" reporter:datatype="timestamp"/>
10503                         <field name="org" reporter:datatype="org_unit"/>
10504                         <field name="original_value" reporter:datatype="text"/>
10505                         <field name="new_value" reporter:datatype="text"/>
10506                         <field name="field_name" reporter:datatype="link"/>
10507                 </fields>
10508                 <links>
10509                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
10510                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
10511                 </links>
10512                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10513                         <actions>
10514                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
10515                                 <retrieve/>
10516                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10517                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
10518                         </actions>
10519                 </permacrud>
10520         </class>
10521         <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">
10522                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10523                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10524                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10525                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10526                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10527                 </fields>
10528                 <links>
10529                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10530                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
10531                 </links>
10532         </class>
10533         <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">
10534                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
10535                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10536                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
10537                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
10538                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10539                 </fields>
10540                 <links>
10541                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
10542                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
10543                 </links>
10544         </class>
10545
10546
10547         <!-- ********************************************************************************************************************* -->
10548
10549 </IDL>
10550
10551 <!--
10552     vim:noet:ts=4:sw=4:
10553 -->