]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/examples/fm_IDL.xml
LP#1479107 Fix IDL classname for account adjustments
[Evergreen.git] / Open-ILS / examples / fm_IDL.xml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!--
3
4 Copyright (C) 2006-2008 Georgia Public Library Service
5 Copyright (C) 2008 Equinox Software, Inc
6 Author: Mike Rylander <miker@esilibrary.com>
7
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
21
22 ############################
23           TEMPLATE
24 ############################
25
26     <class
27         id=""
28         controller="open-ils.cstore open-ils.pcrud"
29         oils_obj:fieldmapper=""
30         oils_persist:tablename=""
31         reporter:label=""
32         oils_persist:field_safe=""
33         oils_persist:virtual=""
34         oils_persist:readonly=""
35         reporter:core=""
36     >
37
38         <oils_persist:source_definition><![CDATA[
39             SELECT * FROM foo
40         ]]></oils_persist:source_definition>
41
42         <fields oils_persist:primary="" oils_persist:sequence="">
43             <field reporter:label="ID" name="id" reporter:datatype="id"/>
44                         <field reporter:label="" name="" reporter:datatype="org_unit"/>
45             <field reporter:label="" name="" reporter:datatype="text"/>
46             <field reporter:label="" name="" reporter:datatype="link"/>
47             <field reporter:label="" name="" reporter:datatype="timestamp"/>
48             <field reporter:label="" name="" reporter:datatype="money"/>
49             <field reporter:label="" name="" reporter:datatype="bool"/>
50             <field reporter:label="" name="" reporter:datatype="int" oils_obj:required="true"/>
51             <field reporter:label="" name="" reporter:datatype="int" oils_persist:virtual="true"/>
52         </fields>
53
54         <links>
55             <link field="" reltype="has_a" key="" map="" class=""/>
56         </links>
57
58         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
59             <actions>
60                 <create permission="" gloabl_required="true"/>
61                 <retrieve/>
62                 <update permission="" context_field=""/>
63                 <delete permission="">
64                     <context link="" field=""/>
65                 </delete>
66             </actions>
67         </permacrud>
68
69     </class>
70
71
72 -->
73
74 <IDL xmlns="http://opensrf.org/spec/IDL/base/v1" xmlns:idl="http://opensrf.org/spec/IDL/base/v1" xmlns:oils_persist="http://open-ils.org/spec/opensrf/IDL/persistence/v1" xmlns:oils_obj="http://open-ils.org/spec/opensrf/IDL/objects/v1" xmlns:reporter="http://open-ils.org/spec/opensrf/IDL/reporter/v1" xmlns:permacrud="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
75
76         <!-- Virtual classes -->
77         <class id="mups" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_payment_summary" oils_persist:virtual="true" reporter:label="User Payment Summary">
78                 <fields>
79                         <field name="usr" oils_persist:virtual="true" />
80                         <field name="forgive_payment" oils_persist:virtual="true" />
81                         <field name="work_payment" oils_persist:virtual="true" />
82                         <field name="credit_payment" oils_persist:virtual="true" />
83                         <field name="goods_payment" oils_persist:virtual="true" />
84                         <field name="account_adjustment" oils_persist:virtual="true" />
85                 </fields>
86                 <links>
87                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
88                 </links>
89         </class>
90
91         <class id="mwps" controller="open-ils.cstore" oils_obj:fieldmapper="money::workstation_payment_summary" oils_persist:virtual="true" reporter:label="Workstation Payment Summary">
92                 <fields>
93                         <field name="workstation" oils_persist:virtual="true" />
94                         <field name="cash_payment" oils_persist:virtual="true" />
95                         <field name="check_payment" oils_persist:virtual="true" />
96                         <field name="credit_card_payment" oils_persist:virtual="true" />
97                 </fields>
98                 <links>
99                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
100                 </links>
101         </class>
102
103         <class id="brn" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_node" oils_persist:virtual="true" reporter:label="Record Node">
104                 <fields>
105                         <field name="id" oils_persist:virtual="true" />
106                         <field name="children" oils_persist:virtual="true" />
107                         <field name="owner_doc" oils_persist:virtual="true" />
108                         <field name="intra_doc_id" oils_persist:virtual="true" />
109                         <field name="parent_node" oils_persist:virtual="true" />
110                         <field name="node_type" oils_persist:virtual="true" />
111                         <field name="namespace_uri" oils_persist:virtual="true" />
112                         <field name="name" oils_persist:virtual="true" />
113                         <field name="value" oils_persist:virtual="true" />
114                 </fields>
115         </class>
116
117         <class id="mvr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::virtual_record" oils_persist:virtual="true" reporter:label="Virtual Record">
118                 <fields>
119                         <field name="title" oils_persist:virtual="true" />
120                         <field name="author" oils_persist:virtual="true" />
121                         <field name="doc_id" oils_persist:virtual="true" />
122                         <field name="doc_type" oils_persist:virtual="true" />
123                         <field name="pubdate" oils_persist:virtual="true" />
124                         <field name="isbn" oils_persist:virtual="true" />
125                         <field name="publisher" oils_persist:virtual="true" />
126                         <field name="tcn" oils_persist:virtual="true" />
127                         <field name="subject" oils_persist:virtual="true" />
128                         <field name="types_of_resource" oils_persist:virtual="true" />
129                         <field name="call_numbers" oils_persist:virtual="true" />
130                         <field name="edition" oils_persist:virtual="true" />
131                         <field name="online_loc" oils_persist:virtual="true" />
132                         <field name="synopsis" oils_persist:virtual="true" />
133                         <field name="physical_description" oils_persist:virtual="true" />
134                         <field name="toc" oils_persist:virtual="true" />
135                         <field name="copy_count" oils_persist:virtual="true" />
136                         <field name="series" oils_persist:virtual="true" />
137                         <field name="serials" oils_persist:virtual="true" />
138                         <field name="foreign_copy_maps" oils_persist:virtual="true" />
139                 </fields>
140         </class>
141
142         <class id="ex" controller="open-ils.cstore" oils_obj:fieldmapper="ex" oils_persist:virtual="true">
143                 <fields>
144                         <field name="err_msg" oils_persist:virtual="true" />
145                         <field name="type" oils_persist:virtual="true" />
146                 </fields>
147         </class>
148
149         <class id="perm_ex" controller="open-ils.cstore" oils_obj:fieldmapper="perm_ex" oils_persist:virtual="true">
150                 <fields>
151                         <field name="err_msg" oils_persist:virtual="true" />
152                         <field name="type" oils_persist:virtual="true" />
153                 </fields>
154         </class>
155
156         <class id="amtr" controller="open-ils.cstore" oils_obj:fieldmapper="action::matrix_test_result" oils_persist:virtual="true" reporter:label="Matrix Test Result">
157                 <fields oils_persist:primary="matchpoint">
158                         <field reporter:label="Matchpoint ID" name="matchpoint" reporter:datatype="id"/>
159                         <field reporter:label="Success" name="success" reporter:datatype="bool"/>
160                         <field reporter:label="Failure Part" name="fail_part" reporter:datatype="text"/>
161                 </fields>
162                 <links>
163                         <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
164                 </links>
165         </class>
166
167         <class id="accs" controller="open-ils.cstore" oils_obj:fieldmapper="action::circ_chain_summary" oils_persist:virtual="true" reporter:label="Circulation Chain Summary">
168         <!-- when the time is right, turn me into a view.  -->
169                 <fields>
170             <field reporter:label="Total Circs" name="num_circs" reporter:datatype="int"/>
171             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
172             <field reporter:label="Checkout Workstation" name="checkout_workstation" reporter:datatype="text"/>
173             <field reporter:label="Last Renewal Time" name="last_renewal_time" reporter:datatype="timestamp"/>
174             <field reporter:label="Last Stop Fines" name="last_stop_fines" reporter:datatype="text"/>
175             <field reporter:label="Last Stop Fines Time" name="last_stop_fines_time" reporter:datatype="timestamp"/>
176             <field reporter:label="Last Renewal Workstation" name="last_renewal_workstation" reporter:datatype="text"/>
177             <field reporter:label="Last Checkin Workstation" name="last_checkin_workstation" reporter:datatype="text"/>
178             <field reporter:label="Last Checkin Time" name="last_checkin_time" reporter:datatype="timestamp"/>
179             <field reporter:label="Last Checkin Scan Time" name="last_checkin_scan_time" reporter:datatype="timestamp"/>
180                 </fields>
181         </class>
182
183         <class id="rhr" oils_obj:fieldmapper="resolver::holdings_record" oils_persist:virtual="true">
184                 <fields>
185                         <field name="public_name" oils_persist:virtual="true" />
186                         <field name="target_url" oils_persist:virtual="true" />
187                         <field name="target_coverage" oils_persist:virtual="true" />
188                         <field name="target_embargo" oils_persist:virtual="true" />
189                 </fields>
190         </class>
191
192         <!-- Actually in the DB -->
193         <class id="vmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::merge_profile" oils_persist:tablename="vandelay.merge_profile" reporter:label="Bib Import Merge Profile">
194                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.merge_profile_id_seq">
195                         <field reporter:label="Field ID" name="id" reporter:selector="name" reporter:datatype="id"/>
196                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
197                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
198                         <field reporter:label="Add Specification" name="add_spec" reporter:datatype="text"/>
199                         <field reporter:label="Replace Specification" name="replace_spec" reporter:datatype="text"/>
200                         <field reporter:label="Remove Specification" name="strip_spec" reporter:datatype="text"/>
201                         <field reporter:label="Preserve Specification" name="preserve_spec" reporter:datatype="text"/>
202                         <field reporter:label="Min. Quality Ratio" name="lwm_ratio" reporter:datatype="float"/>
203                 </fields>
204                 <links>
205                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
206                 </links>
207                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
208                         <actions>
209                                 <create permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE" context_field="owner"/>
210                                 <retrieve permission="ADMIN_MERGE_PROFILE CREATE_MERGE_PROFILE UPDATE_MERGE_PROFILE DELETE_MERGE_PROFILE VIEW_MERGE_PROFILE" context_field="owner"/>
211                                 <update permission="ADMIN_MERGE_PROFILE UPDATE_MERGE_PROFILE" context_field="owner"/>
212                                 <delete permission="ADMIN_MERGE_PROFILE DELETE_MERGE_PROFILE" context_field="owner"/>
213                         </actions>
214                 </permacrud>
215         </class>
216
217         <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">
218                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_bib_trash_fields_id_seq">
219                         <field reporter:label="Field ID" name="id" reporter:datatype="id"/>
220                         <field reporter:label="Group" name="grp" reporter:datatype="link"/>
221                         <field reporter:label="Field" name="field" reporter:datatype="text"/>
222                 </fields>
223                 <links>
224                         <link field="grp" reltype="has_a" key="id" map="" class="vibtg"/>
225                 </links>
226                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
227                         <actions>
228                                 <create permission="CREATE_IMPORT_TRASH_FIELD">
229                     <context link="grp" field="owner"/>
230                 </create>
231                                 <retrieve/>
232                                 <update permission="UPDATE_IMPORT_TRASH_FIELD">
233                     <context link="grp" field="owner"/>
234                 </update>
235                                 <delete permission="DELETE_IMPORT_TRASH_FIELD">
236                     <context link="grp" field="owner"/>
237                 </delete>
238                         </actions>
239                 </permacrud>
240         </class>
241
242         <class  id="vibtg" 
243             controller="open-ils.cstore open-ils.pcrud" 
244             oils_obj:fieldmapper="vandelay::import_bib_trash_group" 
245             oils_persist:tablename="vandelay.import_bib_trash_group" 
246             reporter:label="Import/Overlay Field Groups for Removal">
247                 <fields oils_persist:primary="id" 
248                 oils_persist:sequence="vandelay.import_bib_trash_group_id_seq">
249                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
250                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
251                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
252                         <field reporter:label="Always Apply" name="always_apply" reporter:datatype="bool"/>
253                 </fields>
254                 <links>
255                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
256                 </links>
257                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
258                         <actions>
259                                 <create permission="CREATE_IMPORT_TRASH_FIELD" context_field="owner"/>
260                                 <retrieve/>
261                                 <update permission="UPDATE_IMPORT_TRASH_FIELD" context_field="owner"/>
262                                 <delete permission="DELETE_IMPORT_TRASH_FIELD" context_field="owner"/>
263                         </actions>
264                 </permacrud>
265         </class>
266
267
268         <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">
269                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_id_seq">
270                         <field reporter:label="Import Item ID" name="id" reporter:datatype="id"/>
271                         <field reporter:label="Import Record" name="record" reporter:datatype="link"/>
272                         <field reporter:label="Attribute Definition" name="definition" reporter:datatype="link"/>
273                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
274                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
275                         <field reporter:label="Final Target Copy" name="imported_as" reporter:datatype="link"/>
276                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
277                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="int"/>
278                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="int"/>
279                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
280                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="int"/>
281                         <field reporter:label="Status" name="status" reporter:datatype="int"/>
282                         <field reporter:label="Shelving Location" name="location" reporter:datatype="int"/>
283                         <field reporter:label="Circulate" name="circulate" reporter:datatype="bool"/>
284                         <field reporter:label="Deposit" name="deposit" reporter:datatype="bool"/>
285                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
286                         <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
287                         <field reporter:label="Holdable" name="holdable" reporter:datatype="bool"/>
288                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
289                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
290                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
291                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
292                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
293                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
294                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
295                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
296                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="int"/>
297                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
298                 </fields>
299                 <links>
300                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
301                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
302                         <link field="definition" reltype="has_a" key="id" map="" class="viiad"/>
303                         <link field="imported_as" reltype="has_a" key="id" map="" class="acp"/>
304                 </links>
305                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
306                         <actions>
307                                 <create permission="CREATE_IMPORT_ITEM">
308                     <context link="definition" field="owner"/>
309                                 </create>
310                                 <retrieve permission="CREATE_IMPORT_ITEM UPDATE_IMPORT_ITEM DELETE_IMPORT_ITEM">
311                     <context link="definition" field="owner"/>
312                                 </retrieve>
313                                 <update permission="UPDATE_IMPORT_ITEM">
314                     <context link="definition" field="owner"/>
315                                 </update>
316                                 <delete permission="DELETE_IMPORT_ITEM">
317                     <context link="definition" field="owner"/>
318                                 </delete>
319                         </actions>
320                 </permacrud>
321         </class>
322
323         <class id="viiad" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="vandelay::import_item_attr_definition" oils_persist:tablename="vandelay.import_item_attr_definition" reporter:label="Import Item Attribute Definition">
324                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.import_item_attr_definition_id_seq">
325                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
326                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
327                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
328                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
329                         <field reporter:label="Keep" name="keep" reporter:datatype="bool"/>
330                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="text"/>
331                         <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="text"/>
332                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
333                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
334                         <field reporter:label="Shelving Location" name="location" reporter:datatype="text"/>
335                         <field reporter:label="Circulate" name="circulate" reporter:datatype="text"/>
336                         <field reporter:label="Deposit" name="deposit" reporter:datatype="text"/>
337                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
338                         <field reporter:label="Reference" name="ref" reporter:datatype="text"/>
339                         <field reporter:label="Holdable" name="holdable" reporter:datatype="text"/>
340                         <field reporter:label="Price" name="price" reporter:datatype="text"/>
341                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
342                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="text"/>
343                         <field reporter:label="Circulate As MARC Type" name="circ_as_type" reporter:datatype="text"/>
344                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
345                         <field reporter:label="Public Note" name="pub_note" reporter:datatype="text"/>
346                         <field reporter:label="Private Note" name="priv_note" reporter:datatype="text"/>
347                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="text"/>
348                         <field reporter:label="Copy Number" name="copy_number" reporter:datatype="text"/>
349                         <field reporter:label="Overlay Match ID" name="internal_id" reporter:datatype="text"/>
350                         <field reporter:label="Stat Cat Data" name="stat_cat_data" reporter:datatype="text"/>
351                 </fields>
352                 <links>
353                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
354                 </links>
355                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
356                         <actions>
357                                 <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
358                                 <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"/>
359                                 <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
360                                 <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
361                         </actions>
362                 </permacrud>
363         </class>
364
365         <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">
366                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
367                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
368                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
369                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
370                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
371                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
372                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
373                         <field reporter:label="Item Import Attribute Definition" name="item_attr_def" reporter:datatype="link"/>
374                         <field reporter:label="Match Bucket" name="match_bucket" reporter:datatype="link"/>
375                 </fields>
376                 <links>
377                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
378                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
379                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
380                         <link field="match_bucket" reltype="has_a" key="id" map="" class="cbreb"/>
381                 </links>
382                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
383                         <actions>
384                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
385                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
386                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
387                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
388                         </actions>
389                 </permacrud>
390         </class>
391
392         <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">
393                 <fields oils_persist:primary="code">
394                         <field reporter:label="Error Code" name="code" reporter:selector="description" reporter:datatype="id"/>
395                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
396                 </fields>
397                 <links>
398                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
399                         <link field="item_attr_def" reltype="has_a" key="id" map="" class="viiad"/>
400                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
401                 </links>
402                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
403                         <actions>
404                                 <retrieve/>
405                         </actions>
406                 </permacrud>
407         </class>
408
409         <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">
410                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
411                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
412                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
413                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
414                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
415                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
416                         <field reporter:label="Bib Source" name="bib_source" reporter:datatype="link"/>
417                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
418                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
419                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
420                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
421                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
422                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
423                         <field reporter:label="Import Items" name="import_items" oils_persist:virtual="true" reporter:datatype="link"/>
424                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
425                 </fields>
426                 <links>
427                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
428                         <link field="queue" reltype="has_a" key="id" map="" class="vbq"/>
429                         <link field="bib_source" reltype="has_a" key="id" map="" class="cbs"/>
430                         <link field="imported_as" reltype="has_a" key="id" map="" class="bre"/>
431             <link field="attributes" reltype="has_many" key="record" map="" class="vqbra"/>
432             <link field="matches" reltype="has_many" key="queued_record" map="" class="vbm"/>
433             <link field="import_items" reltype="has_many" key="record" map="" class="vii"/>
434                 </links>
435                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
436                         <actions>
437                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
438                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
439                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
440                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
441                         </actions>
442                 </permacrud>
443         </class>
444
445         <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">
446                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_attr_definition_id_seq">
447                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
448                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
449                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
450                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
451                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
452                 </fields>
453                 <links/>
454                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
455                         <actions>
456                                 <create permission="CREATE_BIB_IMPORT_FIELD_DEF" global_required="true"/>
457                 <retrieve/>
458                                 <update permission="UPDATE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
459                                 <delete permission="DELETE_BIB_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
460                         </actions>
461                 </permacrud>
462         </class>
463
464         <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">
465                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_bib_record_attr_id_seq">
466                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
467                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
468                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
469                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
470                 </fields>
471                 <links>
472                         <link field="record" reltype="has_a" key="id" map="" class="vqbr"/>
473                         <link field="field" reltype="has_a" key="id" map="" class="vqbrad"/>
474                 </links>
475                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
476                         <actions>
477                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
478                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
479                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
480                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
481                         </actions>
482                 </permacrud>
483         </class>
484
485         <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">
486                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.bib_match_id_seq">
487                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
488                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
489                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
490                         <field reporter:label="Quality" name="quality" reporter:datatype="text"/>
491                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
492                 </fields>
493                 <links>
494                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
495                         <link field="eg_record" reltype="has_a" key="id" map="" class="bre"/>
496                 </links>
497                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
498                         <actions>
499                                 <create permission="CREATE_BIB_IMPORT_QUEUE" global_required="true"/>
500                                 <retrieve permission="CREATE_BIB_IMPORT_QUEUE UPDATE_BIB_IMPORT_QUEUE DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
501                                 <update permission="UPDATE_BIB_IMPORT_QUEUE" global_required="true"/>
502                                 <delete permission="DELETE_BIB_IMPORT_QUEUE" global_required="true"/>
503                         </actions>
504                 </permacrud>
505         </class>
506
507         <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">
508                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queue_id_seq">
509                         <field reporter:label="Queue ID" name="id" reporter:selector="name" reporter:datatype="id"/>
510                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
511                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
512                         <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
513                         <field reporter:label="Type" name="queue_type" reporter:datatype="text"/>
514                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
515                 </fields>
516                 <links>
517                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
518                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
519                 </links>
520                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
521                         <actions>
522                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
523                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
524                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
525                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
526                         </actions>
527                 </permacrud>
528         </class>
529
530         <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">
531                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_record_id_seq">
532                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
533                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
534                         <field reporter:label="Import Time" name="import_time" reporter:datatype="timestamp"/>
535                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
536                         <field reporter:label="Queue" name="queue" reporter:datatype="link"/>
537                         <field reporter:label="Final Target Record" name="imported_as" reporter:datatype="link"/>
538                         <field reporter:label="Import Error" name="import_error" reporter:datatype="link"/>
539                         <field reporter:label="Import Error Detail" name="error_detail" reporter:datatype="text"/>
540                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
541                         <field reporter:label="Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link"/>
542                         <field reporter:label="Matches" name="matches" oils_persist:virtual="true" reporter:datatype="link"/>
543                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
544                 </fields>
545                 <links>
546                         <link field="import_error" reltype="has_a" key="code" map="" class="vie"/>
547                         <link field="queue" reltype="has_a" key="id" map="" class="vaq"/>
548                         <link field="imported_as" reltype="has_a" key="id" map="" class="are"/>
549             <link field="attributes" reltype="has_many" key="record" map="" class="vqara"/>
550             <link field="matches" reltype="has_many" key="queued_record" map="" class="vam"/>
551                 </links>
552                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
553                         <actions>
554                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
555                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
556                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
557                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
558                         </actions>
559                 </permacrud>
560         </class>
561
562         <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">
563                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_attr_definition_id_seq">
564                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
565                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
566                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
567                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
568                         <field reporter:label="Remove RegExp" name="remove" reporter:datatype="text"/>
569                 </fields>
570                 <links/>
571                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
572                         <actions>
573                                 <create permission="CREATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
574                 <retrieve/>
575                                 <update permission="UPDATE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
576                                 <delete permission="DELETE_AUTHORITY_IMPORT_IMPORT_FIELD_DEF" global_required="true"/>
577                         </actions>
578                 </permacrud>
579         </class>
580
581         <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">
582                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.queued_authority_record_attr_id_seq">
583                         <field reporter:label="Attribute ID" name="id" reporter:datatype="id"/>
584                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
585                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
586                         <field reporter:label="Value" name="attr_value" reporter:datatype="text"/>
587                 </fields>
588                 <links>
589                         <link field="record" reltype="has_a" key="id" map="" class="vqar"/>
590                         <link field="field" reltype="has_a" key="id" map="" class="vqarad"/>
591                 </links>
592                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
593                         <actions>
594                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
595                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
596                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
597                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
598                         </actions>
599                 </permacrud>
600         </class>
601
602         <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">
603                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.authority_match_id_seq">
604                         <field reporter:label="Match ID" name="id" reporter:datatype="id"/>
605                         <field reporter:label="Queued Record" name="queued_record" reporter:datatype="link"/>
606                         <field reporter:label="Evergreen Record" name="eg_record" reporter:datatype="link"/>
607                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
608                         <field reporter:label="Match Score" name="match_score" reporter:datatype="text"/>
609                 </fields>
610                 <links>
611                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqar"/>
612                         <link field="eg_record" reltype="has_a" key="id" map="" class="are"/>
613                 </links>
614                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
615                         <actions>
616                                 <create permission="CREATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
617                                 <retrieve permission="CREATE_AUTHORITY_IMPORT_QUEUE UPDATE_AUTHORITY_IMPORT_QUEUE DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
618                                 <update permission="UPDATE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
619                                 <delete permission="DELETE_AUTHORITY_IMPORT_QUEUE" global_required="true"/>
620                         </actions>
621                 </permacrud>
622         </class>
623
624         <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">
625                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_id_seq">
626                         <field reporter:label="Match Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
627                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
628                         <field reporter:label="Owning Library" name="owner" reporter:datatype="link"/>
629                         <field reporter:label="Match Set Type" name="mtype" reporter:datatype="text"/>
630                 </fields>
631                 <links>
632                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
633                 </links>
634                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
635                         <actions>
636                                 <create permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
637                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
638                                 <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
639                                 <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
640                         </actions>
641                 </permacrud>
642         </class>
643
644         <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">
645                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_point_id_seq">
646                         <field reporter:label="Match Definition ID" name="id" reporter:datatype="id"/>
647                         <field reporter:label="Expression Tree Parent" name="parent" reporter:datatype="link"/>
648                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
649                         <field reporter:label="Boolean Operator" name="bool_op" reporter:datatype="text"/>
650                         <field reporter:label="Coded Field" name="svf" reporter:datatype="link"/>
651                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
652                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
653             <field reporter:label="Negate" name="negate"  reporter:datatype="bool"/>
654                         <field reporter:label="Importance" name="quality" reporter:datatype="int"/>
655                         <field reporter:label="Expression Tree Children" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
656                         <field reporter:label="Authority Heading" name="heading" reporter:datatype="bool"/>
657                 </fields>
658                 <links>
659                         <link field="parent" reltype="has_a" key="id" map="" class="vmsp"/>
660                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
661                         <link field="svf" reltype="has_a" key="id" map="" class="crad"/>
662                         <link field="children" reltype="has_many" key="parent" map="" class="vmsp"/>
663                 </links>
664                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
665                         <actions>
666                                 <create permission="ADMIN_IMPORT_MATCH_SET">
667                     <context link="match_set" field="owner"/>
668                                 </create>
669                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
670                     <context link="match_set" field="owner"/>
671                                 </retrieve>
672                                 <update permission="ADMIN_IMPORT_MATCH_SET">
673                     <context link="match_set" field="owner"/>
674                                 </update>
675                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
676                     <context link="match_set" field="owner"/>
677                                 </delete>
678                         </actions>
679                 </permacrud>
680         </class>
681
682         <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">
683                 <fields oils_persist:primary="id" oils_persist:sequence="vandelay.match_set_quality_id_seq">
684                         <field reporter:label="Quality Metric ID" name="id" reporter:datatype="id"/>
685                         <field reporter:label="Match Set" name="match_set" reporter:datatype="link"/>
686                         <field reporter:label="Record Attribute" name="svf" reporter:datatype="text"/>
687                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
688                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
689                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
690                         <field reporter:label="Quality" name="quality" reporter:datatype="int"/>
691                 </fields>
692                 <links>
693                         <link field="match_set" reltype="has_a" key="id" map="" class="vms"/>
694                 </links>
695                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
696                         <actions>
697                                 <create permission="ADMIN_IMPORT_MATCH_SET">
698                     <context link="match_set" field="owner"/>
699                                 </create>
700                                 <retrieve permission="ADMIN_IMPORT_MATCH_SET">
701                     <context link="match_set" field="owner"/>
702                                 </retrieve>
703                                 <update permission="ADMIN_IMPORT_MATCH_SET">
704                     <context link="match_set" field="owner"/>
705                                 </update>
706                                 <delete permission="ADMIN_IMPORT_MATCH_SET">
707                     <context link="match_set" field="owner"/>
708                                 </delete>
709                         </actions>
710                 </permacrud>
711         </class>
712
713         <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">
714                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_org_unit_opt_in_id_seq">
715                         <field reporter:label="Opt-in ID" name="id" reporter:datatype="id"/>
716                         <field reporter:label="Workstation" name="opt_in_ws" reporter:datatype="link"/>
717                         <field reporter:label="Staff Member" name="staff" reporter:datatype="link"/>
718                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
719                         <field reporter:label="Allowed Org Unit" name="org_unit" reporter:datatype="link"/>
720                         <field reporter:label="Opt-in Date/Time" name="opt_in_ts" reporter:datatype="timestamp"/>
721                 </fields>
722                 <links>
723                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
724                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
725                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
726                         <link field="opt_in_ws" reltype="has_a" key="id" map="" class="aws"/>
727                 </links>
728         </class>
729
730     <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">
731         <fields oils_persist:primary="name">
732             <field reporter:label="Name" name="name" reporter:datatype="text"/>
733             <field reporter:label="Label" name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
734             <field reporter:label="Value" name="value"  reporter:datatype="text"/>
735             <field reporter:label="Enabled" name="enabled"  reporter:datatype="bool"/>
736         </fields>
737         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
738             <actions>
739                 <create   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
740                 <retrieve permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
741                 <update   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
742                 <delete   permission="ADMIN_GLOBAL_FLAG" global_required="true"/>
743             </actions>
744         </permacrud>
745     </class>
746
747     <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">
748         <fields oils_persist:primary="id">
749             <field reporter:label="ID" name="id" reporter:datatype="id"/>
750             <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
751             <field reporter:label="Description" name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
752             <field reporter:label="Function" name="func"  reporter:datatype="text"/>
753             <field reporter:label="Required Parameter Count" name="param_count"  reporter:datatype="int"/>
754         </fields>
755         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
756             <actions>
757                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
758                 <retrieve/>
759                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
760                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
761             </actions>
762         </permacrud>
763     </class>
764
765         <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">
766                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_index_norm_map_id_seq">
767                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
768                         <field reporter:label="Metabib Field" name="field" reporter:datatype="link"/>
769                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
770                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
771                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
772                 </fields>
773                 <links>
774                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
775                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
776                 </links>
777         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
778             <actions>
779                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
780                 <retrieve/>
781                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
782                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
783             </actions>
784         </permacrud>
785         </class>
786
787         <class id="cmrcfmt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_format" oils_persist:tablename="config.marc_format" reporter:label="MARC Formats" oils_persist:field_safe="true">
788                 <fields oils_persist:primary="id">
789                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
790                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
791                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
792         </fields>
793         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
794             <actions>
795                 <create permission="ADMIN_TAG_TABLE" global_required="true"/>
796                 <retrieve/>
797                 <update permission="ADMIN_TAG_TABLE" global_required="true"/>
798                 <delete permission="ADMIN_TAG_TABLE" global_required="true"/>
799             </actions>
800         </permacrud>
801         </class>
802
803         <class id="cmrcfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_field" oils_persist:tablename="config.marc_field" reporter:label="MARC Fields" oils_persist:field_safe="true">
804                 <fields oils_persist:primary="id">
805                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
806                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
807                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
808                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
809                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
810                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
811                         <field reporter:label="Fixed Field?" name="fixed_field" reporter:datatype="bool"/>
812                         <field reporter:label="Repeatabl?" name="repeatable" reporter:datatype="bool"/>
813                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
814                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
815                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
816         </fields>
817                 <links>
818                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
819                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
820         </links>
821         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
822             <actions>
823                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
824                 <retrieve/>
825                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
826                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
827             </actions>
828         </permacrud>
829         </class>
830
831         <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
832                 <fields oils_persist:primary="id">
833                         <field reporter:label="ID"   name="id" reporter:datatype="id"/>
834                         <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" />
835                         <field reporter:label="MARC Record Type" name="marc_record_type" reporter:datatype="text" />
836                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text" />
837                         <field reporter:label="MARC Subfield" name="code" reporter:datatype="text" />
838                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
839                         <field reporter:label="Repeatable?" name="repeatable" reporter:datatype="bool"/>
840                         <field reporter:label="Mandatory?" name="mandatory" reporter:datatype="bool"/>
841                         <field reporter:label="Hidden?" name="hidden" reporter:datatype="bool"/>
842                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
843         </fields>
844                 <links>
845                         <link field="marc_format" reltype="has_a" key="id" map="" class="cmrcfmt"/>
846                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
847         </links>
848         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
849             <actions>
850                 <create permission="ADMIN_TAG_TABLE" context_field="owner"/>
851                 <retrieve/>
852                 <update permission="ADMIN_TAG_TABLE" context_field="owner"/>
853                 <delete permission="ADMIN_TAG_TABLE" context_field="owner"/>
854             </actions>
855         </permacrud>
856         </class>
857
858         <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">
859                 <fields oils_persist:primary="name">
860                         <field reporter:label="Name" name="name" reporter:datatype="id" reporter:selector="label"  oils_obj:required="true"/>
861                         <field reporter:label="Label" name="label" reporter:datatype="text"  oils_obj:required="true"/>
862                         <field reporter:label="Description" name="description" reporter:datatype="text" />
863                         <field reporter:label="Multi-valued?" name="multi" reporter:datatype="bool"/>
864                         <field reporter:label="Filter?" name="filter" reporter:datatype="bool"/>
865                         <field reporter:label="Sorter?" name="sorter" reporter:datatype="bool"/>
866                         <field reporter:label="Composite attribute?" name="composite" reporter:datatype="bool"/>
867                         <field reporter:label="MARC Tag" name="tag" reporter:datatype="text"/>
868                         <field reporter:label="MARC Subfields" name="sf_list" reporter:datatype="text"/>
869                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text"/>
870                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
871                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
872                         <field reporter:label="Starting Position" name="start_pos" reporter:datatype="int"/>
873                         <field reporter:label="String Length" name="string_len" reporter:datatype="int"/>
874                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
875                         <field reporter:label="Physical Characteristic" name="phys_char_sf" reporter:datatype="text"/>
876                         <field reporter:label="Vocabulary URI" name="vocabulary" reporter:datatype="text"/>
877                         <field reporter:label="Normalizers" name="normalizers" reporter:datatype="link" oils_persist:virtual="true"/>
878                 </fields>
879                 <links>
880                         <link field="format" reltype="has_a" key="name" map="" class="cxt"/>
881                         <link field="normalizers" reltype="has_many" key="name" map="" class="crainm"/>
882                 </links>
883         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
884             <actions>
885                 <create permission="ADMIN_SVF" global_required="true"/>
886                 <retrieve/>
887                 <update permission="ADMIN_SVF" global_required="true"/>
888                 <delete permission="ADMIN_SVF" global_required="true"/>
889             </actions>
890         </permacrud>
891         </class>
892
893         <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">
894                 <fields oils_persist:primary="id" oils_persist:sequence="config.sms_carrier_id_seq">
895                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
896                         <field reporter:label="Region" name="region" reporter:datatype="text" oils_persist:i18n="true"/>
897                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
898             <field reporter:label="Active" name="active" reporter:datatype="bool" oils_persist:i18n="true"/>
899                         <field reporter:label="Email Gateway" name="email_gateway" reporter:datatype="text" oils_persist:i18n="true"/>
900                 </fields>
901                 <links/>
902         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
903             <actions>
904                 <create permission="ADMIN_SMS_CARRIER" global_required="true"/>
905                 <retrieve/>
906                 <update permission="ADMIN_SMS_CARRIER" global_required="true"/>
907                 <delete permission="ADMIN_SMS_CARRIER" global_required="true"/>
908             </actions>
909         </permacrud>
910         </class>
911
912         <class id="ccraed" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::composite_attr_entry_definition" oils_persist:tablename="config.composite_attr_entry_definition" reporter:label="Composite Attribute Definitions" oils_persist:field_safe="true">
913                 <fields oils_persist:primary="coded_value">
914                         <field reporter:label="Coded Value" name="coded_value" reporter:datatype="id" oils_obj:required="true"/>
915                         <field reporter:label="Defintion" name="definition" reporter:datatype="text"  oils_obj:required="true"/>
916                 </fields>
917                 <links>
918                         <link field="coded_value" reltype="has_a" key="id" map="" class="ccvm"/>
919                 </links>
920         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
921             <actions>
922                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
923                 <retrieve/>
924                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
925                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
926             </actions>
927         </permacrud>
928         </class>
929
930         <class id="murav" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::uncontrolled_record_attr_value" oils_persist:tablename="metabib.uncontrolled_record_attr_value" reporter:label="Uncontrolled Record Attribute Values" oils_persist:field_safe="true">
931                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.uncontrolled_record_attr_value_id_seq">
932                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
933                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
934                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
935                 </fields>
936                 <links>
937                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
938                 </links>
939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
940             <actions>
941                 <retrieve/>
942             </actions>
943         </permacrud>
944         </class>
945
946
947         <class id="mrs" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_sorter" oils_persist:tablename="metabib.record_sorter" reporter:label="Record Sort Values" oils_persist:field_safe="true">
948                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.record_sorter_id_seq">
949                         <field reporter:label="ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
950                         <field reporter:label="Bib Record ID" name="source" reporter:datatype="int" oils_obj:required="true"/>
951                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
952                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
953                 </fields>
954                 <links>
955                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
956                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
957                 </links>
958         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
959             <actions>
960                 <retrieve/>
961             </actions>
962         </permacrud>
963         </class>
964
965
966         <class id="mravl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_vector_list" oils_persist:tablename="metabib.record_attr_vector_list" reporter:label="MVF Record Attribute Vectors" oils_persist:field_safe="true">
967                 <fields oils_persist:primary="source">
968                         <field reporter:label="Record ID" name="source" reporter:datatype="id" oils_obj:required="true"/>
969                         <field reporter:label="Vector" name="vlist" reporter:datatype="text"  oils_obj:required="true"/> <!-- Actually an int[], but this is the best we can do in fm_IDL.xml -->
970                 </fields>
971                 <links>
972                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
973                 </links>
974         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
975             <actions>
976                 <retrieve/>
977             </actions>
978         </permacrud>
979         </class>
980
981         <class id="mraf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr_flat" oils_persist:tablename="metabib.record_attr_flat" reporter:label="MVF Record Attribute Flat List" oils_persist:field_safe="true">
982                 <fields>
983                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
984                         <field reporter:label="Attribute" name="attr" reporter:datatype="text"  oils_obj:required="true"/>
985                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true"/>
986                 </fields>
987                 <links>
988                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
989                 </links>
990         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
991             <actions>
992                 <retrieve/>
993             </actions>
994         </permacrud>
995         </class>
996
997         <class id="mra" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::record_attr" oils_persist:tablename="metabib.record_attr" reporter:label="SVF Record Attribute" oils_persist:field_safe="true" oils_persist:readonly="true">
998                 <fields oils_persist:primary="id">
999                         <field reporter:label="Record ID" name="id" reporter:datatype="id" oils_obj:required="true"/>
1000                         <field reporter:label="Attributes" name="attrs" reporter:datatype="text"  oils_obj:required="true"/>
1001                 </fields>
1002                 <links>
1003                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
1004                 </links>
1005         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1006             <actions>
1007                 <retrieve/>
1008             </actions>
1009         </permacrud>
1010         </class>
1011
1012         <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">
1013                 <fields oils_persist:primary="id" oils_persist:sequence="config.record_attr_index_norm_map_id_seq">
1014                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
1015                         <field reporter:label="SVF Attribute" name="attr" reporter:datatype="link"/>
1016                         <field reporter:label="Normalizer" name="norm" reporter:datatype="link"/>
1017                         <field reporter:label="Parameters (JSON Array)" name="params" reporter:datatype="text"/>
1018                         <field reporter:label="Order of Application" name="pos" reporter:datatype="int"/>
1019                 </fields>
1020                 <links>
1021                         <link field="attr" reltype="has_a" key="name" map="" class="crad"/>
1022                         <link field="norm" reltype="has_a" key="id" map="" class="cin"/>
1023                 </links>
1024         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1025             <actions>
1026                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1027                 <retrieve/>
1028                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1029                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
1030             </actions>
1031         </permacrud>
1032         </class>
1033
1034         <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">
1035                 <fields oils_persist:primary="id" oils_persist:sequence="config.coded_value_map_id_seq">
1036                         <field reporter:label="ID" name="id" reporter:datatype="id"  oils_obj:required="true" reporter:selector="value"/>
1037                         <field reporter:label="SVF Attribute" name="ctype" reporter:datatype="link"  oils_obj:required="true"/>
1038                         <field reporter:label="Code" name="code" reporter:datatype="text"  oils_obj:required="true"/>
1039                         <field reporter:label="Value" name="value" reporter:datatype="text"  oils_obj:required="true" oils_persist:i18n="true"/>
1040                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1041                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
1042                         <field reporter:label="Search Label" name="search_label" reporter:datatype="text" oils_persist:i18n="true"/>
1043             <field reporter:label="Is Simple Selector" name="is_simple" reporter:datatype="bool"/>
1044             <field reporter:label="Concept URI" name="concept_uri" reporter:datatype="text"/>
1045             <field reporter:label="Composite Definition" name="composite_def" oils_persist:virtual="true" reporter:datatype="link"/>
1046                 </fields>
1047                 <links>
1048                         <link field="ctype" reltype="has_a" key="name" map="" class="crad"/>
1049                         <link field="composite_def" reltype="might_have" key="coded_value" map="" class="ccraed"/>
1050                 </links>
1051         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1052             <actions>
1053                 <create permission="ADMIN_CODED_VALUE" global_required="true"/>
1054                 <retrieve/>
1055                 <update permission="ADMIN_CODED_VALUE" global_required="true"/>
1056                 <delete permission="ADMIN_CODED_VALUE" global_required="true"/>
1057             </actions>
1058         </permacrud>
1059         </class>
1060
1061         <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">
1062                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq">
1063                         <field name="id"            reporter:datatype="id"   reporter:label="ID"/>
1064                         <field name="label"         reporter:datatype="text" reporter:label="Label"/>
1065                         <field name="host"          reporter:datatype="text" reporter:label="Host"/>
1066                         <field name="username"      reporter:datatype="text" reporter:label="Username"/>
1067                         <field name="password"      reporter:datatype="text" reporter:label="Password"/>
1068                         <field name="account"       reporter:datatype="text" reporter:label="Account"/>
1069                         <field name="path"          reporter:datatype="text" reporter:label="Path"/>
1070                         <field name="owner"         reporter:datatype="link" reporter:label="Owner"/>
1071                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
1072                 </fields>
1073                 <links>
1074                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1075                 </links>
1076         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1077             <actions>
1078                 <create   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1079                 <retrieve permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1080                 <update   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1081                 <delete   permission="ADMIN_CONFIG_REMOTE_ACCOUNT" context_field="owner"/>
1082             </actions>
1083         </permacrud>
1084         </class>
1085
1086     <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">
1087         <fields oils_persist:primary="name">
1088             <field reporter:label="Z39.50 Source" name="name" reporter:datatype="id"/>
1089             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1090             <field reporter:label="Host" name="host"  reporter:datatype="text"/>
1091             <field reporter:label="Port" name="port"  reporter:datatype="int"/>
1092             <field reporter:label="DB" name="db"  reporter:datatype="text"/>
1093             <field reporter:label="Record Format" name="record_format"  reporter:datatype="text"/>
1094             <field reporter:label="Transmission Format" name="transmission_format"  reporter:datatype="text"/>
1095             <field reporter:label="Auth" name="auth"  reporter:datatype="bool"/>
1096             <field reporter:label="Attrs" name="attrs" oils_persist:virtual="true"  reporter:datatype="link"/>
1097             <field reporter:label="Use Permission" name="use_perm"  reporter:datatype="link"/>
1098         </fields>
1099         <links>
1100             <link field="attrs" reltype="has_many" key="source" map="" class="cza"/>
1101             <link field="use_perm" reltype="has_a" key="id" map="" class="ppl"/>
1102         </links>
1103         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1104             <actions>
1105                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1106                 <retrieve/>
1107                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1108                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1109             </actions>
1110         </permacrud>
1111     </class>
1112
1113     <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">
1114         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_attr_id_seq">
1115             <field reporter:label="Z39.50 Attribute ID" name="id" reporter:datatype="id" reporter:selector="label"/>
1116             <field reporter:label="Z39.50 Source" name="source" reporter:datatype="link"/>
1117             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1118             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1119             <field reporter:label="Code" name="code"  reporter:datatype="int"/>
1120             <field reporter:label="Format" name="format"  reporter:datatype="int"/>
1121             <field reporter:label="Truncation" name="truncation"  reporter:datatype="int"/>
1122         </fields>
1123         <links>
1124             <link field="source" reltype="has_a" key="name" map="" class="czs"/>
1125         </links>
1126         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1127             <actions>
1128                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1129                 <retrieve/>
1130                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1131                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1132             </actions>
1133         </permacrud>
1134     </class>
1135
1136     <class id="czifm" controller="open-ils.cstore open-ils.pcrud" 
1137                         oils_obj:fieldmapper="config::z3950_index_field_map" 
1138                         oils_persist:tablename="config.z3950_index_field_map" 
1139                         reporter:label="Z39.50 Index Field Map">
1140         <fields oils_persist:primary="id" oils_persist:sequence="config.z3950_index_field_map_id_seq">
1141             <field reporter:label="Map ID" name="id" reporter:datatype="id"/>
1142             <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1143             <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
1144             <field reporter:label="Record Attribute" name="record_attr" reporter:datatype="link"/>
1145             <field reporter:label="Z39.50 Attribute" name="z3950_attr"  reporter:datatype="link"/>
1146             <field reporter:label="Z39.50 Attribute Type" name="z3950_attr_type" reporter:datatype="text"/>
1147         </fields>
1148         <links>
1149             <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
1150             <link field="record_attr" reltype="has_a" key="name" map="" class="crad"/>
1151             <link field="z3950_attr" reltype="has_a" key="id" map="" class="cza"/>
1152         </links>
1153         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1154             <actions>
1155                 <create permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1156                 <retrieve/>
1157                 <update permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1158                 <delete permission="ADMIN_Z3950_SOURCE" global_required="true"/>
1159             </actions>
1160         </permacrud>
1161     </class>
1162
1163
1164         <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">
1165                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_output_id_seq">
1166                         <field reporter:label="Output ID" name="id" reporter:datatype="id"/>
1167                         <field reporter:label="Create Date/Time" name="create_time" reporter:datatype="timestamp"/>
1168                         <field reporter:label="Data" name="data" reporter:datatype="text"/>
1169                         <field reporter:label="Is Error" name="is_error" reporter:datatype="bool"/>
1170                         <field reporter:label="Events" name="events" oils_persist:virtual="true"  reporter:datatype="link"/>
1171                         <field reporter:label="Error Events" name="error_events" oils_persist:virtual="true"  reporter:datatype="link"/>
1172                 </fields>
1173                 <links>
1174             <link field="events" reltype="has_many" key="template_output" map="" class="atev"/>
1175             <link field="error_events" reltype="has_many" key="error_output" map="" class="atev"/>
1176                 </links>
1177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1178                         <actions>
1179                                 <retrieve/>
1180                                 <delete permission="ADMIN_TRIGGER_TEMPLATE_OUTPUT DELETE_TRIGGER_TEMPLATE_OUTPUT" global_required="true"/>
1181                         </actions>
1182                 </permacrud>
1183         </class>
1184
1185         <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">
1186                 <fields oils_persist:primary="key">
1187                         <field reporter:label="Hook Key" name="key" reporter:datatype="text"/>
1188                         <field reporter:label="Core Type" name="core_type" reporter:datatype="text"/>
1189                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1190                         <field reporter:label="Passive" name="passive"  reporter:datatype="bool"/>
1191                 </fields>
1192                 <links/>
1193                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1194                         <actions>
1195                                 <create permission="ADMIN_TRIGGER_HOOK CREATE_TRIGGER_HOOK" global_required="true"/>
1196                                 <retrieve/>
1197                                 <update permission="ADMIN_TRIGGER_HOOK UPDATE_TRIGGER_HOOK" global_required="true"/>
1198                                 <delete permission="ADMIN_TRIGGER_HOOK DELETE_TRIGGER_HOOK" global_required="true"/>
1199                         </actions>
1200                 </permacrud>
1201         </class>
1202
1203         <class id="atcol" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::collector" oils_persist:tablename="action_trigger.collector" reporter:label="Trigger Environment Collector">
1204                 <fields oils_persist:primary="module">
1205                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1206                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1207                 </fields>
1208                 <links/>
1209         </class>
1210
1211         <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">
1212                 <fields oils_persist:primary="module">
1213                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1214                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1215                 </fields>
1216                 <links/>
1217                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1218                         <actions>
1219                                 <create permission="ADMIN_TRIGGER_VALIDATOR CREATE_TRIGGER_VALIDATOR" global_required="true"/>
1220                                 <retrieve/>
1221                                 <update permission="ADMIN_TRIGGER_VALIDATOR UPDATE_TRIGGER_VALIDATOR" global_required="true"/>
1222                                 <delete permission="ADMIN_TRIGGER_VALIDATOR DELETE_TRIGGER_VALIDATOR" global_required="true"/>
1223                         </actions>
1224                 </permacrud>
1225         </class>
1226
1227         <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">
1228                 <fields oils_persist:primary="module">
1229                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1230                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1231                 </fields>
1232                 <links/>
1233                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1234                         <actions>
1235                                 <create permission="ADMIN_TRIGGER_REACTOR CREATE_TRIGGER_REACTOR" global_required="true"/>
1236                                 <retrieve/>
1237                                 <update permission="ADMIN_TRIGGER_REACTOR UPDATE_TRIGGER_REACTOR" global_required="true"/>
1238                                 <delete permission="ADMIN_TRIGGER_REACTOR DELETE_TRIGGER_REACTOR" global_required="true"/>
1239                         </actions>
1240                 </permacrud>
1241         </class>
1242
1243         <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">
1244                 <fields oils_persist:primary="module">
1245                         <field reporter:label="Module Name" name="module" reporter:datatype="text"/>
1246                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1247                 </fields>
1248                 <links/>
1249                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1250                         <actions>
1251                                 <create permission="ADMIN_TRIGGER_CLEANUP CREATE_TRIGGER_CLEANUP" global_required="true"/>
1252                                 <retrieve/>
1253                                 <update permission="ADMIN_TRIGGER_CLEANUP UPDATE_TRIGGER_CLEANUP" global_required="true"/>
1254                                 <delete permission="ADMIN_TRIGGER_CLEANUP DELETE_TRIGGER_CLEANUP" global_required="true"/>
1255                         </actions>
1256                 </permacrud>
1257         </class>
1258
1259         <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">
1260                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.environment_id_seq">
1261                         <field reporter:label="Environment ID" name="id" reporter:datatype="id"/>
1262                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1263                         <field reporter:label="Field Path" name="path" reporter:datatype="text"/>
1264                         <field reporter:label="Collector" name="collector" reporter:datatype="link"/>
1265                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
1266                 </fields>
1267                 <links>
1268                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1269                         <link field="collector" reltype="has_a" key="id" map="" class="atcol"/>
1270                 </links>
1271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1272                         <actions>
1273                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1274                     <context link="event_def" field="owner"/>
1275                 </create>
1276                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1277                     <context link="event_def" field="owner"/>
1278                 </retrieve>
1279                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1280                     <context link="event_def" field="owner"/>
1281                 </update>
1282                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1283                     <context link="event_def" field="owner"/>
1284                 </delete>
1285                         </actions>
1286                 </permacrud>
1287         </class>
1288
1289         <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">
1290                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_definition_id_seq">
1291                         <field reporter:label="Definition ID" name="id" reporter:datatype="id"/>
1292                         <field reporter:label="Enabled" name="active" reporter:datatype="bool"/>
1293                         <field reporter:label="Owning Library" name="owner"  reporter:datatype="org_unit"/>
1294                         <field reporter:label="Hook" name="hook"  reporter:datatype="link"/>
1295                         <field reporter:label="Validator" name="validator"  reporter:datatype="link"/>
1296                         <field reporter:label="Reactor" name="reactor"  reporter:datatype="link"/>
1297                         <field reporter:label="Success Cleanup" name="cleanup_success"  reporter:datatype="link"/>
1298                         <field reporter:label="Failure Cleanup" name="cleanup_failure"  reporter:datatype="link"/>
1299                         <field reporter:label="Processing Delay" name="delay"  reporter:datatype="interval"/>
1300                         <field reporter:label="Max Event Validity Delay" name="max_delay"  reporter:datatype="interval"/>
1301                         <field reporter:label="Processing Delay Context Field" name="delay_field"  reporter:datatype="text"/>
1302                         <field reporter:label="Processing Group Context Field" name="group_field"  reporter:datatype="text"/>
1303                         <field reporter:label="Template" name="template"  reporter:datatype="text"/>
1304                         <field reporter:label="Name" name="name"  reporter:datatype="text"/>
1305                         <field reporter:label="Granularity" name="granularity"  reporter:datatype="text"/>
1306                         <field reporter:label="Opt-In User Field" name="usr_field"  reporter:datatype="text"/>
1307                         <field reporter:label="Opt-In Setting Type" name="opt_in_setting"  reporter:datatype="link"/>
1308                         <field reporter:label="Event Repeatability Delay" name="repeat_delay"  reporter:datatype="interval"/>
1309                         <field reporter:label="Message Template" name="message_template" reporter:datatype="text"/>
1310                         <field reporter:label="Message Title" name="message_title" reporter:datatype="text"/>
1311                         <field reporter:label="Message User Path" name="message_usr_path" reporter:datatype="text"/>
1312                         <field reporter:label="Message Library Path" name="message_library_path" reporter:datatype="text"/>
1313                         <field reporter:label="Environment Entries" name="env" oils_persist:virtual="true"  reporter:datatype="link"/>
1314                         <field reporter:label="Parameters" name="params" oils_persist:virtual="true"  reporter:datatype="link"/>
1315                 </fields>
1316                 <links>
1317                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
1318                         <link field="hook" reltype="has_a" key="key" map="" class="ath"/>
1319                         <link field="validator" reltype="has_a" key="module" map="" class="atval"/>
1320                         <link field="reactor" reltype="has_a" key="module" map="" class="atreact"/>
1321                         <link field="cleanup_success" reltype="has_a" key="module" map="" class="atclean"/>
1322                         <link field="cleanup_failure" reltype="has_a" key="module" map="" class="atclean"/>
1323                         <link field="env" reltype="has_many" key="event_def" map="" class="atenv"/>
1324                         <link field="params" reltype="has_many" key="event_def" map="" class="atevparam"/>
1325                         <link field="opt_in_setting" reltype="has_a" key="name" map="" class="cust"/>
1326                 </links>
1327                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1328                         <actions>
1329                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1330                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF" context_field="owner"/>
1331                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF" context_field="owner"/>
1332                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF" context_field="owner"/>
1333                         </actions>
1334                 </permacrud>
1335         </class>
1336
1337         <class id="atev" controller="open-ils.cstore" oils_obj:fieldmapper="action_trigger::event" oils_persist:tablename="action_trigger.event" reporter:label="Trigger Event Entry">
1338                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_id_seq">
1339                         <field reporter:label="Event ID" name="id" reporter:datatype="id"/>
1340                         <field reporter:label="Target ID" name="target" reporter:datatype="int"/>
1341                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1342                         <field reporter:label="Add Time" name="add_time" reporter:datatype="timestamp"/>
1343                         <field reporter:label="Run Time" name="run_time" reporter:datatype="timestamp"/>
1344                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
1345                         <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
1346                         <field reporter:label="Complete Time" name="complete_time" reporter:datatype="timestamp"/>
1347                         <field reporter:label="State" name="state" reporter:datatype="text"/>
1348                         <field reporter:label="User Data" name="user_data" reporter:datatype="text"/>
1349                         <field reporter:label="Template Output" name="template_output" reporter:datatype="link"/>
1350                         <field reporter:label="Error Output" name="error_output" reporter:datatype="text"/>
1351                         <field reporter:label="Asynchronous Output" name="async_output" reporter:datatype="link"/>
1352                         <field reporter:label="Update Process" name="update_process" reporter:datatype="int"/>
1353                 </fields>
1354                 <links>
1355                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1356                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo"/>
1357                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo"/>
1358                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo"/>
1359                 </links>
1360         </class>
1361
1362         <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">
1363                 <fields oils_persist:primary="id" oils_persist:sequence="action_trigger.event_params_id_seq">
1364                         <field reporter:label="Parameter ID" name="id" reporter:datatype="id"/>
1365                         <field reporter:label="Event Definition" name="event_def" reporter:datatype="link"/>
1366                         <field reporter:label="Parameter Name" name="param" reporter:datatype="text"/>
1367                         <field reporter:label="Parameter Value" name="value" reporter:datatype="text"/>
1368                 </fields>
1369                 <links>
1370                         <link field="event_def" reltype="has_a" key="id" map="" class="atevdef"/>
1371                 </links>
1372                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1373                         <actions>
1374                                 <create permission="ADMIN_TRIGGER_EVENT_DEF CREATE_TRIGGER_EVENT_DEF">
1375                     <context link="event_def" field="owner"/>
1376                 </create>
1377                                 <retrieve permission="ADMIN_TRIGGER_EVENT_DEF VIEW_TRIGGER_EVENT_DEF">
1378                     <context link="event_def" field="owner"/>
1379                 </retrieve>
1380                                 <update permission="ADMIN_TRIGGER_EVENT_DEF UPDATE_TRIGGER_EVENT_DEF">
1381                     <context link="event_def" field="owner"/>
1382                 </update>
1383                                 <delete permission="ADMIN_TRIGGER_EVENT_DEF DELETE_TRIGGER_EVENT_DEF">
1384                     <context link="event_def" field="owner"/>
1385                 </delete>
1386                         </actions>
1387                 </permacrud>
1388         </class>
1389
1390         <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">
1391                 <oils_persist:source_definition><![CDATA[
1392                 SELECT  atevdef.hook,
1393                         atevdef.name,
1394                         atevdef.reactor,
1395                         atev.id,
1396                         atev.event_def,
1397                         atev.add_time,
1398                         atev.run_time,
1399                         atev.start_time,
1400                         atev.update_time,
1401                         atev.complete_time,
1402                         atev.update_process,
1403                         atev.state,
1404                         atev.user_data,
1405                         atev.template_output,
1406                         atev.error_output,
1407                         atev.async_output,
1408                         targ_circ.id AS target_circ,
1409                         targ_ahr.id AS target_hold,
1410                         COALESCE(
1411                                 targ_circ.circ_lib,
1412                                 targ_ahr.pickup_lib
1413                         ) AS perm_lib
1414                 FROM action_trigger.event atev
1415                 JOIN action_trigger.event_definition atevdef ON
1416                         (atevdef.id = atev.event_def)
1417                 JOIN action_trigger.hook ath ON
1418                         (ath.key = atevdef.hook)
1419                 LEFT JOIN action.circulation targ_circ ON
1420                         (ath.core_type = 'circ' AND targ_circ.id = atev.target)
1421                 LEFT JOIN action.hold_request targ_ahr ON
1422                         (ath.core_type = 'ahr' AND targ_ahr.id = atev.target)
1423                 WHERE atev.add_time > NOW() - (SELECT MAX(value) FROM (
1424                         SELECT value::INTERVAL FROM actor.org_unit_ancestor_setting(
1425                                 'circ.staff.max_visible_event_age',
1426                                 COALESCE(targ_circ.circ_lib, targ_ahr.pickup_lib)
1427                         ) UNION
1428                         SELECT '1000 YEARS'::INTERVAL AS value
1429                 ) ous)
1430                 ]]></oils_persist:source_definition>
1431                 <fields oils_persist:primary="id">
1432                         <field reporter:label="Hook" name="hook" reporter:datatype="link" />
1433                         <field reporter:label="Name" name="name" reporter:datatype="text" />
1434                         <field reporter:label="Reactor" name="reactor" reporter:datatype="text" />
1435                         <field reporter:label="Event ID" name="id" reporter:datatype="id" />
1436                         <field reporter:label="Event Definition ID" name="event_def" reporter:datatype="int" />
1437                         <field reporter:label="Event Add Time" name="add_time" reporter:datatype="timestamp" />
1438                         <field reporter:label="Event Run Time" name="run_time" reporter:datatype="timestamp" />
1439                         <field reporter:label="Event Start Time" name="start_time" reporter:datatype="timestamp" />
1440                         <field reporter:label="Event Update Time" name="update_time" reporter:datatype="timestamp" />
1441                         <field reporter:label="Event Complete Time" name="complete_time" reporter:datatype="timestamp" />
1442                         <field reporter:label="Event Update PID" name="update_process" reporter:datatype="int" />
1443                         <field reporter:label="Event State" name="state" reporter:datatype="text" />
1444                         <field reporter:label="Event User Data" name="user_data" reporter:datatype="text" />
1445                         <field reporter:label="Event Template Output" name="template_output" reporter:datatype="link" />
1446                         <field reporter:label="Event Error Output" name="error_output" reporter:datatype="link" />
1447                         <field reporter:label="Event Async Output" name="async_output" reporter:datatype="link" />
1448                         <field reporter:label="Target Circulation" name="target_circ" reporter:datatype="link" />
1449                         <field reporter:label="Target Hold" name="target_hold" reporter:datatype="link" />
1450                         <field reporter:label="Permission Context" name="perm_lib" reporter:datatype="org_unit" />
1451                 </fields>
1452                 <links>
1453                         <link field="hook" reltype="has_a" key="key" map="" class="ath" />
1454                         <link field="template_output" reltype="has_a" key="id" map="" class="ateo" />
1455                         <link field="error_output" reltype="has_a" key="id" map="" class="ateo" />
1456                         <link field="async_output" reltype="has_a" key="id" map="" class="ateo" />
1457                         <link field="target_circ" reltype="has_a" key="id" map="" class="circ" />
1458                         <link field="target_hold" reltype="has_a" key="id" map="" class="ahr" />
1459                         <link field="perm_lib" reltype="has_a" key="id" map="" class="aou" />
1460                 </links>
1461                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1462                         <actions>
1463                                 <retrieve permission="VIEW_TRIGGER_EVENT" context_field="perm_lib" />
1464                         </actions>
1465                 </permacrud>
1466         </class>
1467
1468         <class id="aws" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::workstation" oils_persist:tablename="actor.workstation" reporter:label="Workstation">
1469                 <fields oils_persist:primary="id" oils_persist:sequence="actor.workstation_id_seq">
1470                         <field reporter:label="Workstation ID" name="id" reporter:datatype="id"/>
1471                         <field reporter:label="Workstation Name" name="name" reporter:datatype="text"/>
1472                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1473                         <field reporter:label="Toolbars" name="toolbars" oils_persist:virtual="true" reporter:datatype="link"/>
1474                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
1475                 </fields>
1476                 <links>
1477                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1478                         <link field="toolbars" reltype="has_many" key="ws" map="" class="atb"/>
1479                         <link field="circulations" reltype="has_many" key="workstation" map="" class="circ"/>
1480                 </links>
1481                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1482                         <actions>
1483                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib" />
1484                         </actions>
1485                 </permacrud>
1486         </class>
1487
1488         <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">
1489                 <fields oils_persist:primary="code">
1490                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1491                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1492                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
1493                         <field reporter:label="SIP2 Media Type" name="sip2_media_type" reporter:datatype="text" oils_persist:i18n="true"/>
1494                         <field reporter:label="Magnetic Media" name="magnetic_media" reporter:datatype="bool"/>
1495                         <field reporter:label="Average Wait Time" name="avg_wait_time" reporter:datatype="interval"/>
1496                 </fields>
1497                 <links/>
1498         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1499             <actions>
1500                 <create permission="ADMIN_CIRC_MOD" global_required="true"/>
1501                 <retrieve/>
1502                 <update permission="ADMIN_CIRC_MOD" global_required="true"/>
1503                 <delete permission="ADMIN_CIRC_MOD" global_required="true"/>
1504             </actions>
1505         </permacrud>
1506         </class>
1507
1508         <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">
1509                 <fields oils_persist:primary="code">
1510                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1511                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1512                         <field reporter:label="Prorate?" name="prorate" reporter:datatype="bool"/>
1513                         <field reporter:label="Blanket?" name="blanket" reporter:datatype="bool"/>
1514                 </fields>
1515                 <links/>
1516         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1517             <actions>
1518                 <create permission="CREATE_INVOICE_ITEM_TYPE" global_required="true"/>
1519                 <retrieve/>
1520                 <update permission="UPDATE_INVOICE_ITEM_TYPE" global_required="true"/>
1521                 <delete permission="DELETE_INVOICE_ITEM_TYPE" global_required="true"/>
1522             </actions>
1523         </permacrud>
1524         </class>
1525
1526         <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">
1527                 <fields oils_persist:primary="code">
1528                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1529                         <field reporter:label="Label" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1530                 </fields>
1531                 <links/>
1532         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1533             <actions>
1534                 <create permission="ADMIN_INVOICE_METHOD CREATE_INVOICE_METHOD" global_required="true"/>
1535                 <retrieve/>
1536                 <update permission="ADMIN_INVOICE_METHOD UPDATE_INVOICE_METHOD" global_required="true"/>
1537                 <delete permission="ADMIN_INVOICE_METHOD DELETE_INVOICE_METHOD" global_required="true"/>
1538             </actions>
1539         </permacrud>
1540         </class>
1541
1542         <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">
1543                 <fields oils_persist:primary="code">
1544                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1545                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1546                 </fields>
1547                 <links/>
1548         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1549             <actions>
1550                 <create permission="CREATE_COPY_BTYPE" global_required="true"/>
1551                 <retrieve/>
1552                 <update permission="UPDATE_COPY_BTYPE" global_required="true"/>
1553                 <delete permission="DELETE_COPY_BTYPE" global_required="true"/>
1554             </actions>
1555         </permacrud>
1556         </class>
1557
1558         <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">
1559                 <fields oils_persist:primary="code">
1560                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1561                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1562                 </fields>
1563                 <links/>
1564         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1565             <actions>
1566                 <create permission="CREATE_CN_BTYPE" global_required="true"/>
1567                 <retrieve/>
1568                 <update permission="UPDATE_CN_BTYPE" global_required="true"/>
1569                 <delete permission="DELETE_CN_BTYPE" global_required="true"/>
1570             </actions>
1571         </permacrud>
1572         </class>
1573
1574         <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">
1575                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_type_id_seq">
1576                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1577                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
1578                 </fields>
1579                 <links/>
1580         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1581             <actions>
1582                 <create permission="CREATE_BIB_PTYPE" global_required="true"/>
1583                 <retrieve/>
1584                 <update permission="UPDATE_BIB_PTYPE" global_required="true"/>
1585                 <delete permission="DELETE_BIB_PTYPE" global_required="true"/>
1586             </actions>
1587         </permacrud>
1588         </class>
1589
1590         <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">
1591                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.peer_bib_copy_map_id_seq">
1592                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
1593                         <field reporter:label="Peer Type" name="peer_type" reporter:datatype="link"/>
1594                         <field reporter:label="Peer Record" name="peer_record" reporter:datatype="link"/>
1595                         <field reporter:label="Target Copy" name="target_copy" reporter:datatype="link"/>
1596                 </fields>
1597         <links>
1598             <link field="peer_type" reltype="has_a" key="id" map="" class="bpt"/>
1599             <link field="peer_record" reltype="has_a" key="id" map="" class="bre"/>
1600             <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
1601         </links>
1602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1603             <actions>
1604                 <create permission="UPDATE_COPY">
1605                     <context link="target_copy" field="circ_lib"/>
1606                 </create>
1607                 <retrieve/>
1608                 <update permission="UPDATE_COPY">
1609                     <context link="target_copy" field="circ_lib"/>
1610                 </update>
1611                 <delete permission="UPDATE_COPY">
1612                     <context link="target_copy" field="circ_lib"/>
1613                 </delete>
1614             </actions>
1615         </permacrud>
1616         </class>
1617
1618         <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">
1619                 <fields oils_persist:primary="code">
1620                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1621                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1622                 </fields>
1623                 <links/>
1624         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1625             <actions>
1626                 <create permission="CREATE_BIB_BTYPE" global_required="true"/>
1627                 <retrieve/>
1628                 <update permission="UPDATE_BIB_BTYPE" global_required="true"/>
1629                 <delete permission="DELETE_BIB_BTYPE" global_required="true"/>
1630             </actions>
1631         </permacrud>
1632         </class>
1633
1634         <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">
1635                 <fields oils_persist:primary="code">
1636                         <field reporter:label="Code" name="code" reporter:selector="name" reporter:datatype="id"/>
1637                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
1638                 </fields>
1639                 <links/>
1640         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1641             <actions>
1642                 <create permission="CREATE_USER_BTYPE" global_required="true"/>
1643                 <retrieve/>
1644                 <update permission="UPDATE_USER_BTYPE" global_required="true"/>
1645                 <delete permission="DELETE_USER_BTYPE" global_required="true"/>
1646             </actions>
1647         </permacrud>
1648         </class>
1649
1650         <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">
1651                 <fields oils_persist:primary="code">
1652                         <field reporter:label="Code" name="code" reporter:selector="value" reporter:datatype="id"/>
1653                         <field reporter:label="Format" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
1654                 </fields>
1655                 <links/>
1656         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1657             <actions>
1658                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
1659                 <retrieve/>
1660                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
1661                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
1662             </actions>
1663         </permacrud>
1664         </class>
1665
1666     <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">
1667         <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_weights_id_seq">
1668             <field reporter:label="Hold Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1669             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1670             <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="float"/>
1671             <field reporter:label="Request Library" name="request_ou" reporter:datatype="float"/>
1672             <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="float"/>
1673             <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="float"/>
1674             <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="float"/>
1675             <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="float"/>
1676             <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="float"/>
1677             <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="float"/>
1678             <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="float"/>
1679             <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="float"/>
1680             <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="float"/>
1681             <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="float"/>
1682             <field reporter:label="Juvenile?" name="juvenile_flag" oils_persist:primitive="string" reporter:datatype="float"/>
1683             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1684             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1685         </fields>
1686         <links/>
1687         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1688             <actions>
1689                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1690                 <retrieve/>
1691                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1692                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1693             </actions>
1694         </permacrud>
1695     </class>
1696
1697     <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">
1698         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_weights_id_seq">
1699             <field reporter:label="Circ Weights ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1700             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1701             <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="float"/>
1702             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="float"/>
1703             <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="float"/>
1704             <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="float"/>
1705             <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="float"/>
1706             <field reporter:label="Permission Group" name="grp" reporter:datatype="float"/>
1707             <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="float"/>
1708             <field reporter:label="Copy Location" name="copy_location" reporter:datatype="float"/>
1709             <field reporter:label="MARC Type" name="marc_type" reporter:datatype="float"/>
1710             <field reporter:label="MARC Form" name="marc_form" reporter:datatype="float"/>
1711             <field reporter:label="MARC Bib Level" name="marc_bib_level" reporter:datatype="float"/>
1712             <field reporter:label="Videorecording Format" name="marc_vr_format" reporter:datatype="float"/>
1713             <field reporter:label="Reference?" name="ref_flag" reporter:datatype="float"/>
1714             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="float"/>
1715             <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="float"/>
1716             <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="float"/>
1717             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="float"/>
1718         </fields>
1719         <links/>
1720         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1721             <actions>
1722                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1723                 <retrieve/>
1724                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1725                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1726             </actions>
1727         </permacrud>
1728     </class>
1729
1730     <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">
1731         <fields oils_persist:primary="id" oils_persist:sequence="config.weight_assoc_id_seq">
1732             <field reporter:label="Assoc ID" name="id" reporter:datatype="id"/>
1733             <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1734             <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
1735             <field reporter:label="Circ Weights" name="circ_weights" reporter:datatype="link"/>
1736             <field reporter:label="Hold Weights" name="hold_weights" reporter:datatype="link"/>
1737         </fields>
1738         <links>
1739             <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1740             <link field="circ_weights" reltype="has_a" key="id" map="" class="ccmw"/>
1741             <link field="hold_weights" reltype="has_a" key="id" map="" class="chmw"/>
1742         </links>
1743         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1744             <actions>
1745                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1746                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1747                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1748                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT ADMIN_HOLD_MATRIX_MATCHPOINT" context_field='org_unit'/>
1749             </actions>
1750         </permacrud>
1751     </class>
1752
1753         <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">
1754                 <fields oils_persist:primary="id" oils_persist:sequence="config.hold_matrix_matchpoint_id_seq">
1755                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1756                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1757                         <field reporter:label="Strict OU matches?" name="strict_ou_match" reporter:datatype="bool"/>
1758                         <field reporter:label="User Home Library" name="user_home_ou" reporter:datatype="org_unit"/>
1759                         <field reporter:label="Request Library" name="request_ou" reporter:datatype="org_unit"/>
1760                         <field reporter:label="Pickup Library" name="pickup_ou" reporter:datatype="org_unit"/>
1761                         <field reporter:label="Owning Library" name="item_owning_ou" reporter:datatype="org_unit"/>
1762                         <field reporter:label="Item Circ Library" name="item_circ_ou" reporter:datatype="org_unit"/>
1763                         <field reporter:label="User Permission Group" name="usr_grp" reporter:datatype="link"/>
1764                         <field reporter:label="Requestor Permission Group" name="requestor_grp" reporter:datatype="link"/>
1765                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1766                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1767                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1768                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1769                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1770                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1771             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1772                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
1773                         <field reporter:label="Range is from Owning Lib?" name="distance_is_from_owner" reporter:datatype="bool"/>
1774                         <field reporter:label="Transit Range" name="transit_range" reporter:datatype="link"/>
1775                         <field reporter:label="Max Holds" name="max_holds" reporter:datatype="int"/>
1776                         <field reporter:label="Max includes Frozen" name="include_frozen_holds" reporter:datatype="bool"/>
1777                         <field reporter:label="Copy Age Hold Protection Rule" name="age_hold_protect_rule" reporter:datatype="link"/>
1778                 </fields>
1779                 <links>
1780                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1781                         <link field="request_ou" reltype="has_a" key="id" map="" class="aou"/>
1782                         <link field="pickup_ou" reltype="has_a" key="id" map="" class="aou"/>
1783                         <link field="item_owning_ou" reltype="has_a" key="id" map="" class="aou"/>
1784                         <link field="item_circ_ou" reltype="has_a" key="id" map="" class="aou"/>
1785                         <link field="usr_grp" reltype="has_a" key="id" map="" class="pgt"/>
1786                         <link field="requestor_grp" reltype="has_a" key="id" map="" class="pgt"/>
1787                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1788                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1789                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1790                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1791                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1792                         <link field="age_hold_protect_rule" reltype="has_a" key="id" map="" class="crahp"/>
1793             <link field="transit_range" reltype="has_a" key="id" map="" class="aout"/>
1794                 </links>
1795         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1796             <actions>
1797                 <create permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1798                 <retrieve permission="ADMIN_HOLD_MATRIX_MATCHPOINT VIEW_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1799                 <update permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1800                 <delete permission="ADMIN_HOLD_MATRIX_MATCHPOINT" global_required="true"/>
1801             </actions>
1802         </permacrud>
1803         </class>
1804
1805         <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">
1806                 <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_matchpoint_id_seq">
1807                         <field reporter:label="Matchpoint ID" name="id" reporter:datatype="id"/>
1808                         <field reporter:label="Renewal?" name="is_renewal" reporter:datatype="bool"/>
1809                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
1810                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" oils_obj:required="true"/>
1811                         <field reporter:label="Copy Circ Lib" name="copy_circ_lib" reporter:datatype="org_unit"/>
1812                         <field reporter:label="Copy Owning Lib" name="copy_owning_lib" reporter:datatype="org_unit"/>
1813                         <field reporter:label="User Home Lib" name="user_home_ou" reporter:datatype="org_unit"/>
1814                         <field reporter:label="Permission Group" name="grp" reporter:datatype="link" oils_obj:required="true"/>
1815                         <field reporter:label="Circulation Modifier" name="circ_modifier" oils_persist:primitive="string" reporter:datatype="link"/>
1816                         <field reporter:label="Copy Location" name="copy_location" reporter:datatype="link"/>
1817                         <field reporter:label="MARC Type" name="marc_type" oils_persist:primitive="string" reporter:datatype="link"/>
1818                         <field reporter:label="MARC Form" name="marc_form" oils_persist:primitive="string" reporter:datatype="link"/>
1819                         <field reporter:label="MARC Bib Level" name="marc_bib_level" oils_persist:primitive="string" reporter:datatype="link"/>
1820                         <field reporter:label="Videorecording Format" name="marc_vr_format" oils_persist:primitive="string" reporter:datatype="link"/>
1821                         <field reporter:label="Reference?" name="ref_flag" reporter:datatype="bool"/>
1822             <field reporter:label="Juvenile?" name="juvenile_flag" reporter:datatype="bool"/>
1823                         <field reporter:label="User Age: Lower Bound" name="usr_age_lower_bound" reporter:datatype="text"/>
1824                         <field reporter:label="User Age: Upper Bound" name="usr_age_upper_bound" reporter:datatype="text"/>
1825             <field reporter:label="Item Age &lt;" name="item_age" reporter:datatype="text"/>
1826                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
1827                         <field reporter:label="Duration Rule" name="duration_rule" reporter:datatype="link"/>
1828                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
1829                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
1830             <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
1831             <field reporter:label="Renewals Override" name="renewals" reporter:datatype="int"/>
1832             <field reporter:label="Grace Period Override" name="grace_period" reporter:datatype="interval"/>
1833                         <field reporter:label="Script Test" name="script_test" reporter:datatype="text"/>
1834                         <field name="total_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Total Copy/Hold Ratio"/>
1835                         <field name="available_copy_hold_ratio" reporter:datatype="float" reporter:label="Minimum Available Copy/Hold Ratio"/>
1836                 </fields>
1837                 <links>
1838                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
1839                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
1840                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1841                         <link field="user_home_ou" reltype="has_a" key="id" map="" class="aou"/>
1842                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
1843                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
1844                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
1845                         <link field="marc_type" reltype="has_a" key="code" map="" class="citm"/>
1846                         <link field="marc_form" reltype="has_a" key="code" map="" class="cifm"/>
1847                         <link field="marc_bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
1848                         <link field="marc_vr_format" reltype="has_a" key="code" map="" class="cvrfm"/>
1849                         <link field="duration_rule" reltype="has_a" key="id" map="" class="crcd"/>
1850                         <link field="max_fine_rule" reltype="has_a" key="id" map="" class="crmf"/>
1851                         <link field="recurring_fine_rule" reltype="has_a" key="id" map="" class="crrf"/>
1852             <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
1853                 </links>
1854         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1855             <actions>
1856                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1857                 <retrieve permission="ADMIN_CIRC_MATRIX_MATCHPOINT VIEW_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1858                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1859                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field='org_unit'/>
1860             </actions>
1861         </permacrud>
1862         </class>
1863
1864     <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">
1865         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_group_id_seq">
1866             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1867             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1868             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1869         </fields>
1870         <links/>
1871         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1872             <actions>
1873                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1874                 <retrieve/>
1875                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1876                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" global_required="true"/>
1877             </actions>
1878         </permacrud>
1879     </class>
1880
1881     <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">
1882         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_id_seq">
1883             <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
1884             <field reporter:label="Name" name="name" reporter:datatype="text"/>
1885             <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
1886             <field reporter:label="Items Out" name="items_out" reporter:datatype="int"/>
1887             <field reporter:label="Min Depth" name="depth" reporter:datatype="int"/>
1888             <field reporter:label="Global" name="global" reporter:datatype="bool"/>
1889             <field reporter:label="Description" name="description" reporter:datatype="text"/>
1890         </fields>
1891         <links>
1892             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
1893         </links>
1894         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1895             <actions>
1896                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1897                 <retrieve/>
1898                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1899                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT" context_field="owning_lib"/>
1900             </actions>
1901         </permacrud>
1902     </class>
1903
1904     <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">
1905         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_matrix_limit_set_map_id_seq">
1906             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1907             <field reporter:label="Matchpoint" name="matchpoint" reporter:datatype="link"/>
1908             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1909             <field reporter:label="Fallthrough" name="fallthrough" reporter:datatype="bool"/>
1910             <field reporter:label="Active" name="active" reporter:datatype="bool"/>
1911         </fields>
1912         <links>
1913             <link field="matchpoint" reltype="has_a" key="id" map="" class="ccmm"/>
1914             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1915         </links>
1916         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1917             <actions>
1918                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1919                     <context link="matchpoint" field="org_unit"/>
1920                 </create>
1921                 <retrieve/>
1922                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1923                     <context link="matchpoint" field="org_unit"/>
1924                 </update>
1925                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1926                     <context link="matchpoint" field="org_unit"/>
1927                 </delete>
1928             </actions>
1929         </permacrud>
1930     </class>
1931
1932     <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">
1933         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_circ_mod_map_id_seq">
1934             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1935             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1936             <field reporter:label="Circulation Modifier" name="circ_mod" reporter:datatype="link"/>
1937         </fields>
1938         <links>
1939             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1940             <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
1941         </links>
1942         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1943             <actions>
1944                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1945                     <context link="limit_set" field="owning_lib"/>
1946                 </create>
1947                 <retrieve/>
1948                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1949                     <context link="limit_set" field="owning_lib"/>
1950                 </update>
1951                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1952                     <context link="limit_set" field="owning_lib"/>
1953                 </delete>
1954             </actions>
1955         </permacrud>
1956     </class>
1957     <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">
1958         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_copy_loc_map_id_seq">
1959             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1960             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1961             <field reporter:label="Copy Location" name="copy_loc" reporter:datatype="link"/>
1962         </fields>
1963         <links>
1964             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1965             <link field="copy_loc" reltype="has_a" key="id" map="" class="acpl"/>
1966         </links>
1967         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1968             <actions>
1969                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1970                     <context link="limit_set" field="owning_lib"/>
1971                 </create>
1972                 <retrieve/>
1973                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1974                     <context link="limit_set" field="owning_lib"/>
1975                 </update>
1976                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1977                     <context link="limit_set" field="owning_lib"/>
1978                 </delete>
1979             </actions>
1980         </permacrud>
1981     </class>
1982
1983     <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">
1984         <fields oils_persist:primary="id" oils_persist:sequence="config.circ_limit_set_group_map_id_seq">
1985             <field reporter:label="ID" name="id" reporter:datatype="id"/>
1986             <field reporter:label="Limit Set" name="limit_set" reporter:datatype="link"/>
1987             <field reporter:label="Limit Group" name="limit_group" reporter:datatype="link"/>
1988             <field reporter:label="Check Only" name="check_only" reporter:datatype="bool"/>
1989         </fields>
1990         <links>
1991             <link field="limit_set" reltype="has_a" key="id" map="" class="ccls"/>
1992             <link field="limit_group" reltype="has_a" key="id" map="" class="cclg"/>
1993         </links>
1994         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
1995             <actions>
1996                 <create permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
1997                     <context link="limit_set" field="owning_lib"/>
1998                 </create>
1999                 <retrieve/>
2000                 <update permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2001                     <context link="limit_set" field="owning_lib"/>
2002                 </update>
2003                 <delete permission="ADMIN_CIRC_MATRIX_MATCHPOINT">
2004                     <context link="limit_set" field="owning_lib"/>
2005                 </delete>
2006             </actions>
2007         </permacrud>
2008     </class>
2009
2010         <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">
2011                 <fields oils_persist:primary="id" oils_persist:sequence="config.identification_type_id_seq">
2012                         <field reporter:label="Identification ID" name="id" reporter:selector="name" reporter:datatype="id"/>
2013                         <field reporter:label="Identification Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
2014                 </fields>
2015                 <links/>
2016         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2017             <actions>
2018                 <create permission="ADMIN_IDENT_TYPE" global_required="true"/>
2019                 <retrieve/>
2020                 <update permission="ADMIN_IDENT_TYPE" global_required="true"/>
2021                 <delete permission="ADMIN_IDENT_TYPE" global_required="true"/>
2022             </actions>
2023         </permacrud>
2024         </class>
2025
2026         <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">
2027                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_question_id_seq">
2028                         <field reporter:label="Answers" name="answers" oils_persist:virtual="true" reporter:datatype="link"/>
2029                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
2030                         <field reporter:label="Question ID" name="id" reporter:datatype="id" />
2031                         <field reporter:label="Question" name="question" reporter:datatype="text"/>
2032                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2033                 </fields>
2034                 <links>
2035                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2036                         <link field="responses" reltype="has_many" key="question" map="" class="asvr"/>
2037                         <link field="answers" reltype="has_many" key="question" map="" class="asva"/>
2038                 </links>
2039         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2040             <actions>
2041                 <create permission="ADMIN_SURVEY">
2042                     <context link="survey" field="owner"/>
2043                 </create>
2044                 <retrieve/>
2045                 <update permission="ADMIN_SURVEY">
2046                     <context link="survey" field="owner"/>
2047                 </update>
2048                 <delete permission="ADMIN_SURVEY">
2049                     <context link="survey" field="owner"/>
2050                 </delete>
2051             </actions>
2052         </permacrud>
2053         </class>
2054         <class id="mbts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction_summary" oils_persist:tablename="money.materialized_billable_xact_summary" reporter:label="Billable Transaction Summary" oils_persist:readonly="true">
2055                 <fields oils_persist:primary="id" oils_persist:sequence="">
2056                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2057                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2058                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2059                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2060                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2061                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2062                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2063                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2064                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2065                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2066                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2067                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2068                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2069                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2070                 </fields>
2071                 <links>
2072                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2073                 </links>
2074                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2075                         <actions>
2076                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2077                                         <context link="usr" field="home_ou" />
2078                                 </retrieve>
2079                         </actions>
2080                 </permacrud>
2081         </class>
2082         <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">
2083                 <fields oils_persist:primary="id" oils_persist:sequence="">
2084                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
2085                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id"/>
2086                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
2087                         <field reporter:label="Last Billing Timestamp" name="last_billing_ts" reporter:datatype="timestamp"/>
2088                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
2089                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
2090                         <field reporter:label="Last Payment Timestamp" name="last_payment_ts" reporter:datatype="timestamp"/>
2091                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
2092                         <field reporter:label="Total Owed" name="total_owed" reporter:datatype="money"/>
2093                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
2094                         <field reporter:label="Billed User" name="usr" reporter:datatype="link"/>
2095                         <field reporter:label="Transaction Finish Time" name="xact_finish" reporter:datatype="timestamp" />
2096                         <field reporter:label="Transaction Start Time" name="xact_start" reporter:datatype="timestamp" />
2097                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
2098                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
2099                 </fields>
2100                 <links>
2101                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2102                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
2103                 </links>
2104         </class>
2105         <class id="aum" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message" oils_persist:tablename="actor.usr_message" reporter:label="User Message">
2106                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2107                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2108                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2109                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2110                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2111                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2112                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2113                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2114                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2115                 </fields>
2116                 <links>
2117                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2118                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2119                 </links>
2120                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2121                         <actions> <!-- created magically, so no create action -->
2122                                 <retrieve permission="VIEW_USER" context_field="sending_lib" />
2123                                 <update permission="UPDATE_USER" context_field="sending_lib" />
2124                                 <delete permission="UPDATE_USER" context_field="sending_lib" />
2125                         </actions>
2126                 </permacrud>
2127         </class>
2128         <class id="auml" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_message_limited" oils_persist:tablename="actor.usr_message_limited" reporter:label="User Message (Limited Access)">
2129                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_message_id_seq">
2130                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2131                         <field reporter:label="Read Date/Time" name="read_date" reporter:datatype="timestamp"/>
2132                         <field reporter:label="Creating Library" name="sending_lib" reporter:datatype="link"/>
2133                         <field reporter:label="Message ID" name="id" reporter:datatype="id" />
2134                         <field reporter:label="Deleted?" name="deleted" reporter:datatype="bool"/>
2135                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
2136                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2137                         <field reporter:label="Message" name="message" reporter:datatype="text"/>
2138                 </fields>
2139                 <links>
2140                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2141                         <link field="sending_lib" reltype="has_a" key="id" map="" class="aou"/>
2142                 </links>
2143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2144                         <actions> <!-- created magically, so no create action -->
2145                                 <retrieve permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2146                                 <update   permission="UPDATE_USER" context_field="sending_lib" owning_user="usr"/>
2147                         </actions>
2148                 </permacrud>
2149         </class>
2150         <class id="aun" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::usr_note" oils_persist:tablename="actor.usr_note" reporter:label="User Note">
2151                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_note_id_seq">
2152                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2153                         <field reporter:label="Creating Staff" name="creator" reporter:datatype="link"/>
2154                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
2155                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
2156                         <field reporter:label="Note Title" name="title" reporter:datatype="text"/>
2157                         <field reporter:label="User" name="usr" reporter:datatype="link" />
2158                         <field reporter:label="Note Content" name="value" reporter:datatype="text"/>
2159                 </fields>
2160                 <links>
2161                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2162                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2163                 </links>
2164         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2165             <actions>
2166                 <create permission="UPDATE_USER" context_field="owner">
2167                     <context link="usr" field="home_ou"/>
2168                 </create>
2169                                 <!-- note: public notes are still accessible via API -->
2170                 <retrieve permission="UPDATE_USER">
2171                     <context link="usr" field="home_ou"/>
2172                                 </retrieve>
2173                 <update permission="UPDATE_USER">
2174                     <context link="usr" field="home_ou"/>
2175                                 </update>
2176                 <delete permission="UPDATE_USER">
2177                     <context link="usr" field="home_ou"/>
2178                                 </delete>
2179             </actions>
2180         </permacrud>
2181         </class>
2182         <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">
2183                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_password_reset_id_seq">
2184                         <field reporter:label="Request ID" name="id" reporter:datatype="id"/>
2185                         <field reporter:label="UUID" name="uuid" reporter:datatype="text"/>
2186                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2187                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
2188                         <field reporter:label="Was Reset?" name="has_been_reset" reporter:datatype="bool"/>
2189                 </fields>
2190                 <links>
2191                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2192                 </links>
2193         </class>
2194         <class id="aus" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_setting" oils_persist:tablename="actor.usr_setting" reporter:label="User Setting">
2195                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_setting_id_seq">
2196                         <field reporter:label="Setting ID" name="id" reporter:datatype="id" />
2197                         <field reporter:label="Name" name="name" reporter:datatype="link"/>
2198                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
2199                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
2200                 </fields>
2201                 <links>
2202                         <link field="name" reltype="has_a" key="name" map="" class="cust"/>
2203                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2204                 </links>
2205         </class>
2206         <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">
2207                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.author_field_entry_id_seq">
2208                         <field name="field" reporter:datatype="link"/>
2209                         <field name="id" reporter:datatype="id" />
2210                         <field name="source" reporter:datatype="link"/>
2211                         <field name="value" reporter:datatype="text"/>
2212                 </fields>
2213                 <links>
2214                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
2215                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2216                 </links>
2217         </class>
2218         <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">
2219                 <fields oils_persist:primary="id" oils_persist:sequence="action.in_house_use_id_seq">
2220                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2221                         <field reporter:label="Item" name="item" reporter:datatype="int" />
2222                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2223                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2224                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2225                 </fields>
2226                 <links>
2227                         <link field="item" reltype="has_a" key="id" map="" class="acp"/>
2228                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2229                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2230                 </links>
2231         </class>
2232         <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">
2233                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cat_in_house_use_id_seq">
2234                         <field reporter:label="Use ID" name="id" reporter:datatype="id" />
2235                         <field reporter:label="Item Type" name="item_type" reporter:datatype="link"/>
2236                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
2237                         <field reporter:label="Recording Staff" name="staff" reporter:datatype="link"/>
2238                         <field reporter:label="Use Date/Time" name="use_time" reporter:datatype="timestamp"/>
2239                 </fields>
2240                 <links>
2241                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
2242                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
2243                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
2244                 </links>
2245         </class>
2246         <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">
2247                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
2248                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="bool"/>
2249                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
2250                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
2251                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
2252                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
2253                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
2254                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
2255                         <field reporter:label="Prev Destination" name="prev_dest" reporter:datatype="org_unit"/>
2256                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
2257                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
2258                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
2259                 </fields>
2260                 <links>
2261                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
2262                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
2263                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
2264                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
2265                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
2266                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2267                 </links>
2268         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2269             <actions>
2270                 <create permission="TRANSIT_COPY" context_field="owner">
2271                     <context link="target_copy" field="circ_lib"/>
2272                 </create>
2273                 <retrieve/>
2274                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
2275                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
2276             </actions>
2277         </permacrud>
2278         </class>
2279         <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">
2280                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_response_id_seq">
2281                         <field reporter:label="Answer" name="answer" reporter:datatype="link"/>
2282                         <field reporter:label="Answer Date/Time" name="answer_date" reporter:datatype="timestamp"/>
2283                         <field reporter:label="Effective Answer Date/Time" name="effective_date" reporter:datatype="timestamp"/>
2284                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
2285                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
2286                         <field reporter:label="Response Group ID" name="response_group_id" reporter:datatype="int" />
2287                         <field reporter:label="Survey" name="survey" reporter:datatype="link"/>
2288                         <field reporter:label="Responding User" name="usr" reporter:datatype="link"/>
2289                 </fields>
2290                 <links>
2291                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
2292                         <link field="survey" reltype="has_a" key="id" map="" class="asv"/>
2293                         <link field="answer" reltype="has_a" key="id" map="" class="asva"/>
2294                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2295                 </links>
2296         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2297             <actions>
2298                 <create permission="ADMIN_SURVEY">
2299                     <context link="survey" field="owner"/>
2300                 </create>
2301                 <retrieve/>
2302                 <update permission="ADMIN_SURVEY">
2303                     <context link="survey" field="owner"/>
2304                 </update>
2305                 <delete permission="ADMIN_SURVEY">
2306                     <context link="survey" field="owner"/>
2307                 </delete>
2308             </actions>
2309         </permacrud>
2310         </class>
2311         <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">
2312                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
2313                         <field name="bucket" />
2314                         <field name="id" reporter:datatype="id" />
2315                         <field name="target_copy" reporter:datatype="link"/>
2316                         <field name="create_time" reporter:datatype="timestamp" />
2317                         <field name="pos" reporter:datatype="int" />
2318                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
2319                 </fields>
2320                 <links>
2321                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
2322                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
2323             <link field="notes" reltype="has_many" map="" key="item" class="ccbin"/>
2324                 </links>
2325         </class>
2326         <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">
2327                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_note_id_seq">
2328                         <field name="id" reporter:datatype="id" />
2329                         <field name="item" reporter:datatype="link"/>
2330                         <field name="note" reporter:datatype="text" />
2331                 </fields>
2332                 <links>
2333                         <link field="item" reltype="has_a" key="id" map="" class="ccbi"/>
2334                 </links>
2335         </class>
2336
2337         <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">
2338                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_id_seq">
2339                         <field reporter:label="Control Set ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2340                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2341                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2342                         <field reporter:label="Controlling Authority Fields" name="authority_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2343                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2344                 </fields>
2345                 <links>
2346                         <link field="authority_fields" reltype="has_many" key="control_set" map="" class="acsaf"/>
2347                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2348                 </links>
2349                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2350                         <actions>
2351                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2352                                 <retrieve/>
2353                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2354                                 <delete permission="DELETE_AUTHORITY_CONTROL_SET" global_required="true"/>
2355                         </actions>
2356                 </permacrud>
2357         </class>
2358
2359         <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">
2360                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_authority_field_id_seq">
2361                         <field reporter:label="Control Set Authority Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2362                         <field reporter:label="Main Entry" name="main_entry" reporter:datatype="link"/>
2363                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2364                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2365                         <field reporter:label="Subfield List" name="sf_list" reporter:datatype="text" />
2366                         <field reporter:label="Subfield List for Display" name="display_sf_list" reporter:datatype="text" />
2367                         <field reporter:label="Non-filing Indicator" name="nfi" reporter:datatype="text" />
2368                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2369                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2370                         <field reporter:label="Linking Subfield" name="linking_subfield" reporter:datatype="text" />
2371                         <field reporter:label="Subordinate Entries" name="sub_entries" reporter:datatype="link" oils_persist:virtual="true"/>
2372                         <field reporter:label="Controlled Bib Fields" name="bib_fields" reporter:datatype="link" oils_persist:virtual="true"/>
2373                         <field reporter:label="Thesauri" name="thesauri" reporter:datatype="link" oils_persist:virtual="true"/>
2374                         <field reporter:label="Browse Axis Maps" name="axis_maps" reporter:datatype="link" oils_persist:virtual="true"/>
2375                         <field reporter:label="Joiner" name="joiner" reporter:datatype="text" />
2376                 </fields>
2377                 <links>
2378                         <link field="axis_maps" reltype="has_many" key="field" map="" class="abaafm"/>
2379                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2380                         <link field="bib_fields" reltype="has_many" key="authority_field" map="" class="acsbf"/>
2381                         <link field="thesauri" reltype="has_many" key="control_set" map="" class="at"/>
2382                         <link field="main_entry" reltype="has_a" key="id" map="" class="acsaf"/>
2383                         <link field="sub_entries" reltype="has_many" key="main_entry" map="" class="acsaf"/>
2384                 </links>
2385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2386                         <actions>
2387                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2388                                 <retrieve/>
2389                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2390                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2391                         </actions>
2392                 </permacrud>
2393         </class>
2394
2395         <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">
2396                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_id_seq">
2397                         <field reporter:label="Controlled Bib Field ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2398                         <field reporter:label="Controlling Authority Field" name="authority_field" reporter:datatype="link"/>
2399                         <field reporter:label="Tag" name="tag" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.{3}$"/>
2400                 </fields>
2401                 <links>
2402                         <link field="authority_field" reltype="has_a" key="id" map="" class="acsaf"/>
2403                 </links>
2404                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2405                         <actions>
2406                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2407                                 <retrieve/>
2408                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2409                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2410                         </actions>
2411                 </permacrud>
2412         </class>
2413
2414         <class id="acsbfmfm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="authority::control_set_bib_field_metabib_field_map" oils_persist:tablename="authority.control_set_bib_field_metabib_field_map" reporter:label="Authority Control Set Bib Field to Metabib Field Map" oils_persist:field_safe="true">
2415                 <fields oils_persist:primary="id" oils_persist:sequence="authority.control_set_bib_field_metabib_field_map_id_seq">
2416                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
2417                         <field reporter:label="Bib Field" name="bib_field" reporter:datatype="link"/>
2418                         <field reporter:label="Metabib Field" name="metabib_field" reporter:datatype="link"/>
2419                 </fields>
2420                 <links>
2421                         <link field="bib_field" reltype="has_a" key="id" map="" class="acsbf"/>
2422                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
2423                 </links>
2424                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2425                         <actions>
2426                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2427                                 <retrieve/>
2428                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2429                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2430                         </actions>
2431                 </permacrud>
2432         </class>
2433
2434         <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">
2435                 <fields oils_persist:primary="code">
2436                         <field reporter:label="Thesaurus Code" name="code" reporter:datatype="id" reporter:selector="name"/>
2437                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2438                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true" />
2439                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2440                 </fields>
2441                 <links>
2442                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2443                 </links>
2444                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2445                         <actions>
2446                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2447                                 <retrieve/>
2448                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2449                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2450                         </actions>
2451                 </permacrud>
2452         </class>
2453
2454         <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">
2455                 <fields oils_persist:primary="code">
2456                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name" oils_obj:validate="^\S+$"/>
2457                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" oils_obj:required="true"/>
2458                         <field reporter:label="Sorter Attribute" name="sorter" reporter:datatype="link"/>
2459                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
2460                         <field reporter:label="Authority Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2461                         <field reporter:label="Authority Field Maps" name="maps" reporter:datatype="link" oils_persist:virtual="true"/>
2462                 </fields>
2463                 <links>
2464                         <link field="sorter" reltype="has_a" key="name" map="" class="crad"/>
2465                         <link field="fields" reltype="has_many" key="axis" map="field" class="abaafm"/>
2466                         <link field="maps" reltype="has_many" key="axis" map="" class="abaafm"/>
2467                 </links>
2468                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2469                         <actions>
2470                                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2471                                 <retrieve/>
2472                                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2473                                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2474                         </actions>
2475                 </permacrud>
2476         </class>
2477
2478     <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">
2479         <fields oils_persist:primary="id" oils_persist:sequence="authority.browse_axis_authority_field_map_id_seq">
2480             <field reporter:label="Axis Authority Field Map ID" name="id" reporter:datatype="id"/>
2481             <field reporter:label="Authority Field" name="field" oils_obj:required="true" reporter:datatype="link"/>
2482             <field reporter:label="Axis" name="axis" reporter:datatype="link" oils_obj:required="true"/>
2483         </fields>
2484         <links>
2485             <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
2486             <link field="axis" reltype="has_a" key="code" map="" class="aba"/>
2487         </links>
2488         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2489             <actions>
2490                 <create permission="CREATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2491                 <retrieve/>
2492                 <update permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2493                 <delete permission="UPDATE_AUTHORITY_CONTROL_SET" global_required="true"/>
2494             </actions>
2495         </permacrud>
2496     </class>
2497
2498         <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">
2499                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_entry_id_seq">
2500                         <field name="active" reporter:datatype="bool"/>
2501                         <field name="create_date" reporter:datatype="timestamp"/>
2502                         <field name="creator" />
2503                         <field name="deleted" reporter:datatype="bool"/>
2504                         <field name="edit_date" reporter:datatype="timestamp"/>
2505                         <field name="editor" />
2506                         <field name="id" reporter:datatype="id" />
2507                         <field name="last_xact_id" />
2508                         <field name="marc" />
2509                         <field name="source" />
2510                         <field reporter:label="Control Set" name="control_set" reporter:datatype="link"/>
2511                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2512                         <field name="heading" />
2513                         <field name="simple_heading" />
2514                         <field name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2515                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2516                         <field name="bib_links" oils_persist:virtual="true" reporter:datatype="link"/>
2517                 </fields>
2518                 <links>
2519                         <link field="control_set" reltype="has_a" key="id" map="" class="acs"/>
2520                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2521                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2522                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2523                         <link field="notes" reltype="has_many" key="record" map="" class="arn"/>
2524                         <link field="bib_links" reltype="has_many" key="authority" map="" class="abl"/>
2525                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="ard"/>
2526                 </links>
2527                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2528                         <actions>
2529                                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
2530                                 <retrieve/>
2531                                 <update permission="UPDATE_MARC" global_required="true"/>
2532                                 <delete permission="UPDATE_MARC" global_required="true"/>
2533                         </actions>
2534                 </permacrud>
2535         </class>
2536         <class id="ard" controller="open-ils.cstore" oils_obj:fieldmapper="authority::record_descriptor" oils_persist:tablename="authority.rec_descriptor" reporter:label="Authority Record Descriptor">
2537                 <fields oils_persist:primary="id" oils_persist:sequence="authority.rec_descriptor_id_seq">
2538                         <field name="char_encoding" />
2539                         <field name="id" />
2540                         <field name="record" />
2541                         <field name="record_status" />
2542                         <field name="thesaurus" />
2543                 </fields>
2544                 <links>
2545                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2546                         <link field="thesaurus" reltype="might_have" key="code" map="" class="at"/>
2547                 </links>
2548         </class>
2549         <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">
2550                 <fields oils_persist:primary="id" oils_persist:sequence="authority.bib_linking_id_seq">
2551                         <field name="id" reporter:datatype="id" />
2552                         <field name="bib" reporter:datatype="link" />
2553                         <field name="authority" reporter:datatype="link" />
2554                 </fields>
2555                 <links>
2556                         <link field="bib" reltype="has_a" key="id" map="" class="bre"/>
2557                         <link field="authority" reltype="has_a" key="id" map="" class="are"/>
2558                 </links>
2559         </class>
2560         <class id="ash" controller="open-ils.cstore" oils_obj:fieldmapper="authority::simple_heading" oils_persist:tablename="authority.simple_heading" reporter:label="Authority Simple Heading">
2561                 <fields oils_persist:primary="id" oils_persist:sequence="authority.simple_heading_id_seq">
2562                         <field name="id" reporter:datatype="id" />
2563                         <field name="record" reporter:datatype="link" />
2564                         <field name="atag" reporter:datatype="link" />
2565                         <field name="value" reporter:datatype="text" />
2566                 </fields>
2567                 <links>
2568                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
2569                         <link field="atag" reltype="has_a" key="id" map="" class="acsaf"/>
2570                 </links>
2571         </class>
2572         <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">
2573                 <fields oils_persist:primary="code" oils_persist:sequence="">
2574                         <field reporter:label="Language Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2575                         <field reporter:label="Language" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
2576                 </fields>
2577                 <links/>
2578         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2579             <actions>
2580                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2581                 <retrieve/>
2582                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2583                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2584             </actions>
2585         </permacrud>
2586         </class>
2587         <class id="mccp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_card_payment" oils_persist:tablename="money.credit_card_payment" reporter:label="Credit Card Payment">
2588                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
2589                         <field name="accepting_usr" />
2590                         <field name="amount" reporter:datatype="money" />
2591                         <field name="amount_collected" reporter:datatype="money" />
2592                         <field name="approval_code" reporter:datatype="text"/>
2593                         <field name="cash_drawer" reporter:datatype="link"/>
2594                         <field name="cc_first_name" reporter:datatype="text"/>
2595                         <field name="cc_last_name" reporter:datatype="text"/>
2596                         <field name="cc_number" reporter:datatype="text"/>
2597                         <field name="cc_order_number" reporter:datatype="text"/>
2598                         <field name="cc_type" reporter:datatype="text"/>
2599                         <field name="cc_processor" reporter:datatype="text"/>
2600                         <field name="expire_month" reporter:datatype="int" />
2601                         <field name="expire_year" reporter:datatype="int" />
2602                         <field name="id" reporter:datatype="id" />
2603                         <field name="note" reporter:datatype="text"/>
2604                         <field name="payment_ts" reporter:datatype="timestamp"/>
2605                         <field name="xact" reporter:datatype="link"/>
2606                         <field name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
2607                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
2608                 </fields>
2609                 <links>
2610                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
2611                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
2612                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
2613                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
2614                 </links>
2615         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2616             <actions>
2617                 <retrieve permission="VIEW_USER_TRANSACTIONS">
2618                     <context link="xact" jump="usr" field="home_ou"/>
2619                 </retrieve>
2620                         </actions>
2621                 </permacrud>
2622         </class>
2623         <class id="cxt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::xml_transform" oils_persist:tablename="config.xml_transform" reporter:label="XML/XSLT Transform Definition">
2624                 <fields oils_persist:primary="name">
2625                         <field reporter:label="Name" name="name" reporter:datatype="text" />
2626                         <field reporter:label="Namespace URI" name="namespace_uri" reporter:datatype="text"/>
2627                         <field reporter:label="Namespace Prefix" name="prefix" reporter:datatype="text"/>
2628                         <field reporter:label="XSLT" name="xslt" reporter:datatype="text" />
2629                 </fields>
2630                 <links/>
2631         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2632             <actions>
2633                 <create permission="CREATE_XML_TRANSFORM" global_required="true"/>
2634                 <retrieve/>
2635                 <update permission="UPDATE_XML_TRANSFORM" global_required="true"/>
2636                 <delete permission="DELETE_XML_TRANSFORM" global_required="true"/>
2637             </actions>
2638         </permacrud>
2639         </class>
2640
2641         <class id="cmsa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_search_alias" oils_persist:tablename="config.metabib_search_alias" reporter:label="Metabib Search Alias" oils_persist:field_safe="true">
2642                 <fields oils_persist:primary="alias">
2643                         <field reporter:label="Alias (RegExp)" name="alias" reporter:datatype="text"/>
2644                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2645                         <field reporter:label="Field" name="field" reporter:datatype="link"/>
2646                 </fields>
2647                 <links>
2648                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2649                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
2650                 </links>
2651         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2652             <actions>
2653                 <create permission="CREATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2654                 <retrieve/>
2655                 <update permission="UPDATE_METABIB_SEARCH_ALIAS" global_required="true"/>
2656                 <delete permission="DELETE_METABIB_SEARCH_ALIAS" global_required="true"/>
2657             </actions>
2658         </permacrud>
2659         </class>
2660
2661         <class id="cmc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_class" oils_persist:tablename="config.metabib_class" reporter:label="Metabib Class" oils_persist:field_safe="true">
2662                 <fields oils_persist:primary="name">
2663                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2664                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2665                         <field reporter:label="Buoyant?" name="buoyant" reporter:datatype="bool" />
2666                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2667                         <field reporter:label="Combined?" name="combined" reporter:datatype="bool" />
2668                         <field reporter:label="A Weight" name="a_weight" reporter:datatype="float" />
2669                         <field reporter:label="B Weight" name="b_weight" reporter:datatype="float" />
2670                         <field reporter:label="C Weight" name="c_weight" reporter:datatype="float" />
2671                         <field reporter:label="D Weight" name="d_weight" reporter:datatype="float" />
2672                         <field reporter:label="Fields" name="fields" reporter:datatype="link" oils_persist:virtual="true"/>
2673                 </fields>
2674                 <links>
2675                         <link field="fields" reltype="has_many" key="name" map="" class="cmf"/>
2676                 </links>
2677         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2678             <actions>
2679                 <create permission="CREATE_METABIB_CLASS" global_required="true"/>
2680                 <retrieve/>
2681                 <update permission="UPDATE_METABIB_CLASS" global_required="true"/>
2682                 <delete permission="DELETE_METABIB_CLASS" global_required="true"/>
2683             </actions>
2684         </permacrud>
2685         </class>
2686
2687         <class id="cmf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::metabib_field" oils_persist:tablename="config.metabib_field" reporter:label="Metabib Field" oils_persist:field_safe="true">
2688                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_id_seq">
2689                         <field reporter:label="Class" name="field_class" reporter:datatype="link"/>
2690                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="label"/>
2691                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2692                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
2693                         <field reporter:label="XPath" name="xpath" reporter:datatype="text"/>
2694                         <field reporter:label="Weight" name="weight" reporter:datatype="int" />
2695                         <field reporter:label="Format" name="format" reporter:datatype="link"/>
2696                         <field reporter:label="Search Field" name="search_field" reporter:datatype="bool" />
2697                         <field reporter:label="Facet Field" name="facet_field" reporter:datatype="bool" />
2698                         <field reporter:label="Facet XPath" name="facet_xpath" reporter:datatype="text" />
2699                         <field reporter:label="Browse Field" name="browse_field" reporter:datatype="bool" />
2700                         <field reporter:label="Browse XPath" name="browse_xpath" reporter:datatype="text" />
2701                         <field reporter:label="Restrict?" name="restrict" reporter:datatype="bool" />
2702                 </fields>
2703                 <links>
2704                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
2705                 </links>
2706         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2707             <actions>
2708                 <create permission="CREATE_METABIB_FIELD" global_required="true"/>
2709                 <retrieve/>
2710                 <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
2711                 <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
2712             </actions>
2713         </permacrud>
2714         </class>
2715         <class id="cbho" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::best_hold_order" oils_persist:tablename="config.best_hold_order" reporter:label="Best-Hold Sort Order">
2716                 <fields oils_persist:primary="id" oils_persist:sequence="config.best_hold_order_id_seq">
2717                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
2718                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
2719                         <field reporter:label="Capture Lib to Pickup Lib Proximity" name="pprox" reporter:datatype="int" />
2720                         <field reporter:label="Circ Lib to Request Lib Proximity" name="hprox" reporter:datatype="int" />
2721                         <field reporter:label="Adjusted Circ Lib to Pickup Lib Proximity" name="aprox" reporter:datatype="int" />
2722                         <field reporter:label="Adjusted Capture Location to Pickup Lib Proximity" name="approx" reporter:datatype="int" />
2723                         <field reporter:label="Hold Priority" name="priority" reporter:datatype="int" />
2724                         <field reporter:label="Hold Cut-in-line State" name="cut" reporter:datatype="int" />
2725                         <field reporter:label="Hold Selection Depth" name="depth" reporter:datatype="int" />
2726                         <field reporter:label="Copy Has Circulated From Home Lately" name="htime" reporter:datatype="int" />
2727                         <field reporter:label="Hold Request Time" name="rtime" reporter:datatype="int" />
2728                         <field reporter:label="Copy Has Been Home At All Lately" name="shtime" reporter:datatype="int" />
2729                 </fields>
2730                 <links>
2731                 </links>
2732                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2733                         <actions>
2734                                 <create permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2735                                 <retrieve permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2736                                 <update permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2737                                 <delete permission="ADMIN_HOLD_CAPTURE_SORT" global_required="true"/>
2738                         </actions>
2739                 </permacrud>
2740         </class>
2741         <class id="cbfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::biblio_fingerprint" oils_persist:tablename="config.biblio_fingerprint" reporter:label="Fingerprint Definition">
2742                 <fields oils_persist:primary="id" oils_persist:sequence="config.biblio_fingerprint_id_seq">
2743                         <field name="id" reporter:datatype="id" />
2744                         <field name="name" reporter:datatype="text"/>
2745                         <field name="xpath" reporter:datatype="text"/>
2746                         <field name="format" reporter:datatype="link"/>
2747                         <field name="first_word" reporter:datatype="bool" />
2748                 </fields>
2749                 <links/>
2750         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2751             <actions>
2752                 <create permission="CREATE_BIBLIO_FINGERPRINT" global_required="true"/>
2753                 <retrieve/>
2754                 <update permission="UPDATE_BIBLIO_FINGERPRINT" global_required="true"/>
2755                 <delete permission="DELETE_BIBLIO_FINGERPRINT" global_required="true"/>
2756             </actions>
2757         </permacrud>
2758         </class>
2759         <class id="cam" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::audience_map" oils_persist:tablename="config.audience_map" reporter:label="Audience Map" oils_persist:field_safe="true">
2760                 <fields oils_persist:primary="code" oils_persist:sequence="">
2761                         <field reporter:label="Audience Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2762                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
2763                         <field reporter:label="Audience" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2764                 </fields>
2765                 <links/>
2766         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2767             <actions>
2768                 <create permission="CREATE_MARC_CODE" global_required="true"/>
2769                 <retrieve/>
2770                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
2771                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
2772             </actions>
2773         </permacrud>
2774         </class>
2775         <class id="cifm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::item_form_map" oils_persist:tablename="config.item_form_map" reporter:label="Item Form Map" oils_persist:field_safe="true">
2776                 <fields oils_persist:primary="code" oils_persist:sequence="">
2777                         <field reporter:label="Item Form Code" name="code" reporter:selector="value" reporter:datatype="text"/>
2778                         <field reporter:label="Item Form" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
2779                 </fields>
2780                 <links/>
2781         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2782             <actions>
2783                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
2784                 <retrieve/>
2785                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
2786                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
2787             </actions>
2788         </permacrud>
2789         </class>
2790     <class id="acnc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_class" oils_persist:tablename="asset.call_number_class" reporter:label="Call number classification scheme">
2791         <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_class_id_seq">
2792             <field reporter:label="Call number class ID" name="id" reporter:datatype="id"/>
2793             <field reporter:label="Name" name="name" reporter:datatype="text"/>
2794             <field reporter:label="Normalizer function" name="normalizer" reporter:datatype="text"/>
2795             <field reporter:label="Call number fields" name="field" reporter:datatype="text"/>
2796         </fields>
2797         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2798             <actions>
2799                 <retrieve/>
2800             </actions>
2801         </permacrud>
2802     </class>
2803         <class id="acns" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_suffix" oils_persist:tablename="asset.call_number_suffix" reporter:label="Call Number/Volume Suffix">
2804                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_suffix_id_seq">
2805                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2806                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2807                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2808                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2809                 </fields>
2810                 <links>
2811                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2812                 </links>
2813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2814             <actions>
2815                 <create permission="CREATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2816                 <retrieve/>
2817                 <update permission="UPDATE_VOLUME_SUFFIX" context_field="owning_lib"/>
2818                 <delete permission="DELETE_VOLUME_SUFFIX" context_field="owning_lib"/>
2819             </actions>
2820         </permacrud>
2821         </class>
2822         <class id="acnp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number_prefix" oils_persist:tablename="asset.call_number_prefix" reporter:label="Call Number/Volume Prefix">
2823                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_prefix_id_seq">
2824                         <field reporter:label="ID" name="id" reporter:datatype="id" />
2825                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2826                         <field reporter:label="Label Sort Key" name="label_sortkey" reporter:datatype="text"/>
2827                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2828                 </fields>
2829                 <links>
2830                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2831                 </links>
2832         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2833             <actions>
2834                 <create permission="CREATE_VOLUME_PREFIX" context_field="owning_lib"/>
2835                 <retrieve/>
2836                 <update permission="UPDATE_VOLUME_PREFIX" context_field="owning_lib"/>
2837                 <delete permission="DELETE_VOLUME_PREFIX" context_field="owning_lib"/>
2838             </actions>
2839         </permacrud>
2840         </class>
2841         <class id="acn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::call_number" oils_persist:tablename="asset.call_number" reporter:label="Call Number/Volume">
2842                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_id_seq">
2843                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
2844                         <field reporter:label="Create Date/Time" name="create_date" reporter:datatype="timestamp"/>
2845                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
2846                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
2847                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
2848                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2849                         <field reporter:label="Call Number/Volume ID" name="id" reporter:datatype="id" />
2850                         <field reporter:label="Call Number Label" name="label" reporter:datatype="text"/>
2851                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
2852                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
2853                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2854                         <field reporter:label="URI Maps" name="uri_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2855                         <field reporter:label="URIs" name="uris" oils_persist:virtual="true" reporter:datatype="link"/>
2856                         <field reporter:label="Call Number Sort Key" name="label_sortkey" reporter:datatype="text"/>
2857                         <field reporter:label="Classification Scheme" name="label_class" reporter:datatype="link"/>
2858                         <field reporter:label="Prefix" name="prefix" reporter:datatype="link"/>
2859                         <field reporter:label="Suffix" name="suffix" reporter:datatype="link"/>
2860                 </fields>
2861                 <links>
2862                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2863                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2864                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
2865                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
2866                         <link field="notes" reltype="has_many" key="call_number" map="" class="acnn"/>
2867                         <link field="copies" reltype="has_many" key="call_number" map="" class="acp"/>
2868                         <link field="uris" reltype="has_many" key="call_number" map="uri" class="auricnm"/>
2869                         <link field="uri_maps" reltype="has_many" key="call_number" map="" class="auricnm"/>
2870                         <link field="label_class" reltype="has_a" key="id" map="" class="acnc"/>
2871                         <link field="prefix" reltype="has_a" key="id" map="" class="acnp"/>
2872                         <link field="suffix" reltype="has_a" key="id" map="" class="acns"/>
2873                 </links>
2874         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2875             <actions>
2876                 <create permission="CREATE_VOLUME" context_field="owning_lib"/>
2877                 <retrieve/>
2878                 <update permission="UPDATE_VOLUME" context_field="owning_lib"/>
2879                 <delete permission="DELETE_VOLUME" context_field="owning_lib"/>
2880             </actions>
2881         </permacrud>
2882         </class>
2883         <class id="auri" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri" oils_persist:tablename="asset.uri" reporter:label="Electronic Access URI">
2884                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_id_seq">
2885                         <field reporter:label="URI ID" name="id" reporter:datatype="id"/>
2886                         <field reporter:label="URI" name="href" reporter:datatype="text"/>
2887                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
2888                         <field reporter:label="Use Information" name="use_restriction" reporter:datatype="text"/>
2889                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
2890                         <field reporter:label="Call Number Maps" name="call_number_maps" oils_persist:virtual="true" reporter:datatype="link"/>
2891                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2892                 </fields>
2893                 <links>
2894                         <link field="call_numbers" reltype="has_many" key="uri" map="call_number" class="auricnm"/>
2895                         <link field="call_number_maps" reltype="has_many" key="uri" map="" class="auricnm"/>
2896         </links>
2897         </class>
2898         <class id="auricnm" controller="open-ils.cstore" oils_obj:fieldmapper="asset::uri_call_number_map" oils_persist:tablename="asset.uri_call_number_map" reporter:label="Electronic Access URI to Call Number Map">
2899                 <fields oils_persist:primary="id" oils_persist:sequence="asset.uri_call_number_map_id_seq">
2900                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
2901                         <field reporter:label="URI" name="uri" reporter:datatype="int"/>
2902                         <field reporter:label="Call Number" name="call_number" reporter:datatype="text"/>
2903                 </fields>
2904                 <links>
2905                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
2906                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
2907                 </links>
2908         </class>
2909         <class id="cst" controller="open-ils.cstore" oils_obj:fieldmapper="config::standing" oils_persist:tablename="config.standing" reporter:label="Standing Penalty">
2910                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_id_seq">
2911                         <field name="id" reporter:datatype="id" />
2912                         <field name="value" oils_persist:i18n="true" />
2913                 </fields>
2914                 <links/>
2915         </class>
2916         <class id="mous" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_user_summary" oils_persist:tablename="money.open_usr_summary" reporter:label="Open User Summary">
2917                 <fields oils_persist:primary="usr" oils_persist:sequence="">
2918                         <field name="balance_owed" reporter:datatype="money" />
2919                         <field name="total_owed" reporter:datatype="money" />
2920                         <field name="total_paid" reporter:datatype="money" />
2921                         <field name="usr" reporter:datatype="link"/>
2922                 </fields>
2923                 <links>
2924                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2925         </links>
2926         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2927             <actions>
2928                 <retrieve permission="VIEW_USER">
2929                     <context link="usr" field="home_ou"/>
2930                 </retrieve>
2931             </actions>
2932         </permacrud>
2933         </class>
2934         <class id="mct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::collections_tracker" oils_persist:tablename="money.collections_tracker" reporter:label="Collections Tracker">
2935                 <fields oils_persist:primary="id" oils_persist:sequence="money.collections_tracker_id_seq">
2936                         <field name="collector" />
2937                         <field name="enter_time" reporter:datatype="timestamp"/>
2938                         <field name="id" reporter:datatype="id" />
2939                         <field name="location" reporter:datatype="link"/>
2940                         <field name="usr" reporter:datatype="link"/>
2941                 </fields>
2942                 <links>
2943                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
2944                         <link field="collector" reltype="has_a" key="id" map="" class="au"/>
2945                         <link field="location" reltype="has_a" key="id" map="" class="aou"/>
2946                 </links>
2947         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
2948             <actions>
2949                 <create permission="money.collections_tracker.create" context_field="location"/>
2950                 <retrieve permission="money.collections_tracker.create" context_field="location"/> 
2951                 <delete permission="money.collections_tracker.create" context_field="location"/>
2952             </actions>
2953         </permacrud>
2954         </class>
2955         <class id="bre" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::record_entry" oils_persist:tablename="biblio.record_entry" reporter:core="true" reporter:label="Bibliographic Record">
2956                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry_id_seq">
2957                         <field reporter:label="Call Numbers" name="call_numbers" oils_persist:virtual="true" reporter:datatype="link"/>
2958                         <field reporter:label="Fixed Field Entry" name="fixed_fields" oils_persist:virtual="true" reporter:datatype="link"/>
2959                         <field reporter:label="Is Active?" name="active" reporter:datatype="bool"/>
2960                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
2961                         <field reporter:label="Record Creator" name="creator" reporter:datatype="link"/>
2962                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool"/>
2963                         <field reporter:label="Last Edit Data/Time" name="edit_date" reporter:datatype="timestamp"/>
2964                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
2965                         <field reporter:label="Fingerprint" name="fingerprint"  reporter:datatype="text"/>
2966                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
2967                         <field reporter:label="Last Transaction ID" name="last_xact_id"  reporter:datatype="text"/>
2968                         <field reporter:label="MARC21Slim" name="marc"  reporter:datatype="text"/>
2969                         <field reporter:label="Overall Quality" name="quality" reporter:datatype="int" />
2970                         <field reporter:label="Record Source" name="source" reporter:datatype="link"/>
2971                         <field reporter:label="TCN Source" name="tcn_source"  reporter:datatype="text"/>
2972                         <field reporter:label="TCN Value" name="tcn_value"  reporter:datatype="text"/>
2973                         <field reporter:label="Owner" name="owner"  reporter:datatype="org_unit"/>
2974                         <field reporter:label="Share Depth" name="share_depth"  reporter:datatype="int"/>
2975                         <field reporter:label="Metarecord" name="metarecord" oils_persist:virtual="true" reporter:datatype="link"/>
2976                         <field reporter:label="Language Code" name="language" oils_persist:virtual="true" reporter:datatype="link"/>
2977                         <field reporter:label="Non-MARC Record Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
2978                         <field reporter:label="Indexed Keyword Field Entries" name="keyword_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2979                         <field reporter:label="Indexed Subject Field Entries" name="subject_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2980                         <field reporter:label="Indexed Title Field Entries" name="title_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2981                         <field reporter:label="Indexed Identifier Field Entries" name="identifier_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2982                         <field reporter:label="Indexed Author Field Entries" name="author_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2983                         <field reporter:label="Indexed Series Field Entries" name="series_field_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2984                         <field reporter:label="Flattened MARC Fields " name="full_record_entries" oils_persist:virtual="true" reporter:datatype="link"/>
2985                         <field reporter:label="Simple Record Extracts " name="simple_record" oils_persist:virtual="true" reporter:datatype="link"/>
2986                         <field reporter:label="Authority Links" name="authority_links" oils_persist:virtual="true" reporter:datatype="link"/>
2987                         <field reporter:label="Subscriptions" name="subscriptions" oils_persist:virtual="true" reporter:datatype="link"/>
2988                         <field reporter:label="SVF Attributes" name="attrs" oils_persist:virtual="true" reporter:datatype="link"/>
2989                 </fields>
2990                 <links>
2991                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
2992                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
2993                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
2994                         <link field="simple_record" reltype="might_have" key="id" map="" class="rmsr"/>
2995                         <link field="metarecord" reltype="might_have" key="source" map="metarecord" class="mmrsm"/>
2996                         <link field="call_numbers" reltype="has_many" key="record" map="" class="acn"/>
2997                         <link field="keyword_field_entries" reltype="has_many" key="source" map="" class="mkfe"/>
2998                         <link field="fixed_fields" reltype="might_have" key="record" map="" class="mrd"/>
2999                         <link field="language" reltype="might_have" key="record" map="item_lang" class="mrd"/>
3000                         <link field="subject_field_entries" reltype="has_many" key="source" map="" class="msfe"/>
3001                         <link field="title_field_entries" reltype="has_many" key="source" map="" class="mtfe"/>
3002                         <link field="identifier_field_entries" reltype="has_many" key="source" map="" class="mife"/>
3003                         <link field="notes" reltype="has_many" key="record" map="" class="bren"/>
3004                         <link field="author_field_entries" reltype="has_many" key="source" map="" class="mafe"/>
3005                         <link field="series_field_entries" reltype="has_many" key="source" map="" class="msefe"/>
3006                         <link field="full_record_entries" reltype="has_many" key="record" map="" class="mfr"/>
3007                         <link field="authority_links" reltype="has_many" key="bib" map="" class="abl"/>
3008                         <link field="subscriptions" reltype="has_many" key="record_entry" map="" class="ssub"/>
3009                         <link field="attrs" reltype="might_have" key="id" map="" class="mra"/>
3010                         <link field="source" reltype="has_a" key="id" map="" class="cbs"/>
3011                 </links>
3012         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3013             <actions>
3014                 <create permission="CREATE_MARC IMPORT_MARC" global_required="true"/>
3015                 <retrieve/>
3016                 <update permission="UPDATE_MARC" global_required="true"/>
3017                 <!-- WARNING: Deleting records via PCRUD does NOT check that any prerequisite conditions have been handled first. It is your responsibility to check for those conditions before deleting bib records. -->
3018                 <delete permission="DELETE_RECORD" global_required="true"/>
3019             </actions>
3020         </permacrud>
3021         </class>
3022         <class id="aouhoo" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit::hours_of_operation" oils_persist:tablename="actor.hours_of_operation" reporter:label="Hours of Operation">
3023                 <fields oils_persist:primary="id">
3024                         <field name="dow_0_close" />
3025                         <field name="dow_0_open" />
3026                         <field name="dow_1_close" />
3027                         <field name="dow_1_open" />
3028                         <field name="dow_2_close" />
3029                         <field name="dow_2_open" />
3030                         <field name="dow_3_close" />
3031                         <field name="dow_3_open" />
3032                         <field name="dow_4_close" />
3033                         <field name="dow_4_open" />
3034                         <field name="dow_5_close" />
3035                         <field name="dow_5_open" />
3036                         <field name="dow_6_close" />
3037                         <field name="dow_6_open" />
3038                         <field name="id" reporter:datatype="id" />
3039                         <field name="org_unit" oils_persist:virtual="true" reporter:datatype="org_unit"/>
3040                 </fields>
3041                 <links>
3042                         <link field="id" reltype="might_have" key="id" map="" class="aou"/>
3043                 </links>
3044         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3045             <actions>
3046                 <create permission="CREATE_HOURS_OF_OPERATION" context_field="id"/>
3047                 <retrieve/>
3048                 <update permission="UPDATE_HOURS_OF_OPERATION" context_field="id"/>
3049                 <delete permission="DELETE_HOURS_OF_OPERATION" context_field="id"/>
3050             </actions>
3051         </permacrud>
3052         </class>
3053         <class id="bmp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="biblio::monograph_part" oils_persist:tablename="biblio.monograph_part" reporter:label="Monograph Parts" oils_persist:field_safe="true">
3054                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.monograph_part_id_seq">
3055                         <field name="id" reporter:datatype="id" />
3056                         <field name="record" reporter:datatype="link"/>
3057                         <field name="label" reporter:datatype="text"/>
3058                         <field name="label_sortkey" reporter:datatype="text"/>
3059                 </fields>
3060                 <links>
3061                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3062                 </links>
3063         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3064             <actions>
3065                 <create permission="CREATE_MONOGRAPH_PART" global_required="true"/>
3066                 <retrieve/>
3067                 <update permission="UPDATE_MONOGRAPH_PART" global_required="true"/>
3068                 <delete permission="DELETE_MONOGRAPH_PART" global_required="true"/>
3069             </actions>
3070         </permacrud>
3071         </class>
3072         <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">
3073                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_part_map_id_seq">
3074                         <field name="id" reporter:datatype="id" />
3075                         <field name="target_copy" reporter:datatype="link" />
3076                         <field name="part" reporter:datatype="link"/>
3077                 </fields>
3078                 <links>
3079                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
3080                         <link field="part" reltype="has_a" key="id" map="" class="bmp"/>
3081                 </links>
3082         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3083             <actions>
3084                 <create permission="MAP_MONOGRAPH_PART" global_required="true"/>
3085                 <retrieve/>
3086                 <update permission="MAP_MONOGRAPH_PART" global_required="true"/>
3087                 <delete permission="MAP_MONOGRAPH_PART" global_required="true"/>
3088             </actions>
3089         </permacrud>
3090         </class>
3091         <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">
3092                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_closed_id_seq">
3093                         <field name="close_end" reporter:datatype="timestamp" />
3094                         <field name="close_start" reporter:datatype="timestamp" />
3095                         <field name="id" reporter:datatype="id" />
3096                         <field name="org_unit" reporter:datatype="org_unit"/>
3097                         <field name="reason" reporter:datatype="text"/>
3098                 </fields>
3099                 <links>
3100                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3101                 </links>
3102         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3103             <actions>
3104                 <create permission="CREATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3105                 <retrieve/>
3106                 <update permission="UPDATE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3107                 <delete permission="DELETE_ORG_UNIT_CLOSING" context_field="org_unit"/>
3108             </actions>
3109         </permacrud>
3110         </class>
3111         <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">
3112                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_circ_duration_id_seq">
3113                         <field name="extended" reporter:datatype="interval"/>
3114                         <field name="id" reporter:datatype="id" reporter:selector="name"/>
3115                         <field name="max_renewals" reporter:datatype="int" />
3116                         <field name="name" reporter:datatype="text"/>
3117                         <field name="normal" reporter:datatype="interval"/>
3118                         <field name="shrt" reporter:datatype="interval"/>
3119                 </fields>
3120                 <links>
3121                 </links>
3122         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3123             <actions>
3124                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3125                 <retrieve/>
3126                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3127                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3128             </actions>
3129         </permacrud>
3130         </class>
3131
3132         <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">
3133                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_id_seq">
3134                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
3135                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3136             <field reporter:label="Always Use?" name="forceto" reporter:datatype="bool"/>
3137                         <field reporter:label="Current Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3138             <field reporter:label="Owner" name="owner" reporter:datatype="org_unit"/>
3139                 </fields>
3140                 <links>
3141             <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3142                 </links>
3143                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3144             <actions>
3145                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3146                 <retrieve/>
3147                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3148                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3149             </actions>
3150                 </permacrud>
3151         </class>
3152
3153         <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">
3154                 <fields oils_persist:primary="id" oils_persist:sequence="config.hard_due_date_values_id_seq">
3155                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3156                         <field reporter:label="Hard Due Date" name="hard_due_date" reporter:datatype="link"/>
3157                         <field reporter:label="Ceiling Date" name="ceiling_date" reporter:datatype="timestamp"/>
3158             <field reporter:label="Active Date" name="active_date" reporter:datatype="timestamp"/>
3159                 </fields>
3160                 <links>
3161                         <link field="hard_due_date" reltype="has_a" key="id" map="" class="chdd"/>
3162                 </links>
3163                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3164             <actions>
3165                 <create permission="CREATE_CIRC_DURATION" global_required="true"/>
3166                 <retrieve/>
3167                 <update permission="UPDATE_CIRC_DURATION" global_required="true"/>
3168                 <delete permission="DELETE_CIRC_DURATION" global_required="true"/>
3169             </actions>
3170                 </permacrud>
3171         </class>
3172
3173         <class id="mobts" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::open_billable_transaction_summary" oils_persist:tablename="money.open_billable_xact_summary" reporter:label="Open Billable Transaction Summary">
3174                 <fields oils_persist:primary="id" oils_persist:sequence="">
3175                         <field name="balance_owed" reporter:datatype="money"/>
3176                         <field name="id" reporter:datatype="id" />
3177                         <field name="last_billing_note" reporter:datatype="text"/>
3178                         <field name="last_billing_ts" reporter:datatype="timestamp"/>
3179                         <field name="last_billing_type" reporter:datatype="text"/>
3180                         <field name="last_payment_note" reporter:datatype="text"/>
3181                         <field name="last_payment_ts" reporter:datatype="timestamp"/>
3182                         <field name="last_payment_type" reporter:datatype="text"/>
3183                         <field name="total_owed" reporter:datatype="money"/>
3184                         <field name="total_paid" reporter:datatype="money"/>
3185                         <field name="usr" reporter:datatype="link"/>
3186                         <field name="xact_finish" reporter:datatype="timestamp" />
3187                         <field name="xact_start" reporter:datatype="timestamp" />
3188                         <field name="xact_type" reporter:datatype="text"/>
3189                         <field name="xact" oils_persist:virtual="true" reporter:datatype="link"/>
3190                         <field name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
3191                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
3192                         <field name="reservation" oils_persist:virtual="true" reporter:datatype="link"/>
3193                         <field name="billing_location" reporter:datatype="link"/>
3194                 </fields>
3195                 <links>
3196                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3197                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
3198                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
3199                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
3200                         <link field="reservation" reltype="might_have" key="id" map="" class="bresv"/>
3201                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
3202                 </links>
3203                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3204                         <actions>
3205                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3206                                         <context link="usr" field="home_ou" />
3207                                 </retrieve>
3208                         </actions>
3209                 </permacrud>
3210         </class>
3211         <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">
3212                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_id_seq">
3213                         <field reporter:label="All Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
3214                         <field reporter:label="All Library Cards" name="cards" oils_persist:virtual="true" reporter:datatype="link"/>
3215                         <field reporter:label="All Circulations" name="checkouts" oils_persist:virtual="true" reporter:datatype="link"/>
3216                         <field reporter:label="All Hold Requests" name="hold_requests" oils_persist:virtual="true" reporter:datatype="link"/>
3217                         <field reporter:label="All Permissions" name="permissions" oils_persist:virtual="true" reporter:datatype="link"/>
3218                         <field reporter:label="All User Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
3219                         <field reporter:label="Standing Penalties" name="standing_penalties" oils_persist:virtual="true" reporter:datatype="link"/>
3220                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
3221                         <field reporter:label="Survey Responses" name="survey_responses" oils_persist:virtual="true" reporter:datatype="link"/>
3222                         <field reporter:label="Workstation Org Unit" name="ws_ou" oils_persist:virtual="true" reporter:datatype="link"/>
3223                         <field reporter:label="Workstation ID" name="wsid" oils_persist:virtual="true" reporter:datatype="link"/>
3224                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3225                         <field reporter:label="Alert Message" name="alert_message"  reporter:datatype="text"/>
3226                         <field reporter:label="Barred" name="barred" reporter:datatype="bool"/>
3227                         <field reporter:label="Physical Address" name="billing_address" reporter:datatype="link"/>
3228                         <field reporter:label="Current Library Card" name="card" reporter:datatype="link"/>
3229                         <field reporter:label="Claims-returned Count" name="claims_returned_count" reporter:datatype="int" />
3230                         <field reporter:label="Claims Never Checked Out Count" name="claims_never_checked_out_count" reporter:datatype="int" />
3231                         <field reporter:label="Record Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3232                         <field reporter:label="User Credit Balance" name="credit_forward_balance" reporter:datatype="money" />
3233                         <field reporter:label="Daytime Phone" name="day_phone"  reporter:datatype="text"/>
3234                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
3235                         <field reporter:label="Email Address" name="email"  reporter:datatype="text"/>
3236                         <field reporter:label="Evening Phone" name="evening_phone"  reporter:datatype="text"/>
3237                         <field reporter:label="Privilege Expiration Date" name="expire_date" reporter:datatype="timestamp"/>
3238                         <field reporter:label="Last Name" name="family_name"  reporter:datatype="text"/>
3239                         <field reporter:label="First Name" name="first_given_name"  reporter:datatype="text"/>
3240                         <field reporter:label="Home Library" name="home_ou" reporter:datatype="org_unit"/>
3241                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
3242                         <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="link"/>
3243                         <field reporter:label="Secondary Identification Type" name="ident_type2" reporter:datatype="link"/>
3244                         <field reporter:label="Primary Identification" name="ident_value"  reporter:datatype="text"/>
3245                         <field reporter:label="Secondary Identification" name="ident_value2"  reporter:datatype="text"/>
3246                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
3247                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
3248                         <field reporter:label="Is Group Lead Account" name="master_account" reporter:datatype="bool"/>
3249                         <field reporter:label="Internet Access Level" name="net_access_level" reporter:datatype="link"/>
3250                         <field reporter:label="Other Phone" name="other_phone"  reporter:datatype="text"/>
3251                         <field reporter:label="Password" name="passwd" suppress_controller="open-ils.pcrud open-ils.reporter-store" reporter:datatype="text"/>
3252                         <field reporter:label="Photo URL" name="photo_url"  reporter:datatype="text"/>
3253                         <field reporter:label="Prefix/Title" name="prefix"  reporter:datatype="text"/>
3254                         <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="link"/>
3255                         <field reporter:label="Middle Name" name="second_given_name"  reporter:datatype="text"/>
3256                         <field reporter:label="Standing (unused)" name="standing" reporter:datatype="link"/>
3257                         <field reporter:label="Suffix" name="suffix"  reporter:datatype="text"/>
3258                         <field reporter:label="Is Super User" name="super_user" reporter:datatype="bool"/>
3259                         <field reporter:label="Family Linkage or other Group" name="usrgroup" reporter:datatype="int"/>
3260                         <field reporter:label="OPAC/Staff Client User Name" name="usrname"  reporter:datatype="text"/>
3261                         <field reporter:label="OPAC/Staff Client Holds Alias" name="alias"  reporter:datatype="text"/>
3262                         <field reporter:label="Juvenile" name="juvenile"  reporter:datatype="bool"/>
3263                         <field reporter:label="Record Last Update Time" name="last_update_time" reporter:datatype="timestamp"/>
3264                         <field reporter:label="Additional Permission Groups" name="groups" oils_persist:virtual="true" reporter:datatype="link"/>
3265                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
3266                         <field reporter:label="User Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
3267                         <field reporter:label="Demographic Info" name="demographic" oils_persist:virtual="true" reporter:datatype="link"/>
3268                         <field reporter:label="Billable Transactions" name="billable_transactions" oils_persist:virtual="true" reporter:datatype="link"/>
3269                         <field reporter:label="Money Summary" name="money_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3270                         <field reporter:label="Open Billable Transactions" name="open_billable_transactions_summary" oils_persist:virtual="true" reporter:datatype="link"/>
3271                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
3272                         <field reporter:label="Circulations Performed as Staff" name="performed_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
3273                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
3274                         <field reporter:label="Reservations" name="reservations" oils_persist:virtual="true" reporter:datatype="link"/>
3275                         <field reporter:label="User Activity Entries" name="usr_activity" oils_persist:virtual="true" reporter:datatype="link"/>
3276                 </fields>
3277                 <links>
3278                         <link field="demographic" reltype="might_have" key="id" map="" class="rud"/>
3279                         <link field="net_access_level" reltype="has_a" key="id" map="" class="cnal"/>
3280                         <link field="profile" reltype="has_a" key="id" map="" class="pgt"/>
3281                         <link field="ident_type" reltype="has_a" key="id" map="" class="cit"/>
3282                         <link field="billing_address" reltype="has_a" key="id" map="" class="aua"/>
3283                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aua"/>
3284                         <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
3285                         <link field="standing" reltype="has_a" key="id" map="" class="cst"/>
3286                         <link field="card" reltype="has_a" key="id" map="" class="ac"/>
3287                         <link field="ident_type2" reltype="has_a" key="id" map="" class="cit"/>
3288                         <link field="stat_cat_entries" reltype="has_many" key="target_usr" map="" class="actscecm"/>
3289                         <link field="groups" reltype="has_many" key="usr" map="grp" class="pugm"/>
3290                         <link field="usrgroup" reltype="has_many" key="usrgroup" map="" class="au"/>
3291                         <link field="checkouts" reltype="has_many" key="usr" map="" class="circ"/>
3292                         <link field="hold_requests" reltype="has_many" key="usr" map="" class="ahr"/>
3293                         <link field="permissions" reltype="has_many" key="usr" map="perm" class="pupm"/>
3294                         <link field="settings" reltype="has_many" key="usr" map="" class="aus"/>
3295                         <link field="billable_transactions" reltype="has_many" key="usr" map="" class="mbt"/>
3296                         <link field="open_billable_transactions_summary" reltype="has_many" key="usr" map="" class="mobts"/>
3297                         <link field="money_summary" reltype="might_have" key="usr" map="" class="mus"/>
3298                         <link field="standing_penalties" reltype="has_many" key="usr" map="" class="ausp"/>
3299                         <link field="addresses" reltype="has_many" key="usr" map="" class="aua"/>
3300                         <link field="survey_responses" reltype="has_many" key="usr" map="" class="asvr"/>
3301                         <link field="notes" reltype="has_many" key="usr" map="" class="aun"/>
3302                         <link field="checkins" reltype="has_many" key="checkin_staff" map="" class="circ"/>
3303                         <link field="cards" reltype="has_many" key="usr" map="" class="ac"/>
3304                         <link field="performed_circulations" reltype="has_many" key="circ_staff" map="" class="circ"/>
3305                         <link field="fund_alloc_pcts" reltype="has_many" key="allocator" map="" class="acqfap"/>
3306                         <link field="reservations" reltype="has_many" key="usr" map="" class="bresv"/>
3307                         <link field="usr_activity" reltype="has_many" key="usr" map="" class="auact"/>
3308                 </links>
3309                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3310                         <actions>
3311                                 <retrieve permission="VIEW_USER" context_field="home_ou" />
3312                         </actions>
3313                 </permacrud>
3314         </class>
3315         <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">
3316                 <fields oils_persist:primary="id" oils_persist:sequence="config.usr_activity_type_id_seq">
3317                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3318                         <field name="ewho" reporter:label="Event Caller" reporter:datatype="text"/>
3319                         <field name="ewhat" reporter:label="Event Type" reporter:datatype="text"/>
3320                         <field name="ehow" reporter:label="Event Mechanism" reporter:datatype="text"/>
3321                         <field name="label" reporter:label="Label" reporter:datatype="text"/>
3322                         <field name="egroup" reporter:label="Activity Group" reporter:datatype="text"/>
3323                         <field name="enabled" reporter:label="Enabled" reporter:datatype="bool"/>
3324                         <field name="transient" reporter:label="Transient" reporter:datatype="bool"/>
3325         </fields>
3326                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3327                         <actions>
3328                                 <create permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3329                                 <retrieve/>
3330                                 <update permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3331                                 <delete permission="ADMIN_USER_ACTIVITY_TYPE" global_required="true"/>
3332                         </actions>
3333                 </permacrud>
3334         </class>
3335         <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">
3336                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_activity_id_seq">
3337                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3338                         <field name="usr" reporter:label="User" reporter:datatype="link" />
3339                         <field name="etype" reporter:label="Activity Type" reporter:datatype="link" />
3340                         <field name="event_time" reporter:label="Event Time" reporter:datatype="timestamp" />
3341         </fields>
3342         <links>
3343                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3344                         <link field="etype" reltype="has_a" key="id" map="" class="cuat"/>
3345                 </links>
3346                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3347                         <actions>
3348                                 <retrieve permission="RUN_REPORTS">
3349                                         <context link="usr" field="home_ou" />
3350                                 </retrieve>
3351                         </actions>
3352                 </permacrud>
3353         </class>
3354         <class id="atb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::toolbar" oils_persist:tablename="actor.toolbar" reporter:label="Custom Toolbar">
3355                 <fields oils_persist:primary="id" oils_persist:sequence="actor.toolbar_id_seq">
3356                         <field name="id" reporter:label="ID" reporter:datatype="id" />
3357                         <field name="usr" reporter:label="Owning User" reporter:datatype="link" />
3358                         <field name="org" reporter:label="Owning Org Unit" reporter:datatype="link" />
3359                         <field name="ws" reporter:label="Owning Workstation" reporter:datatype="link" />
3360                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true" />
3361                         <field name="layout" reporter:label="Layout" reporter:datatype="text" />
3362         </fields>
3363         <links>
3364                         <link field="usr" reltype="might_have" key="id" map="" class="au"/>
3365                         <link field="org" reltype="might_have" key="id" map="" class="aou"/>
3366                         <link field="ws" reltype="might_have" key="id" map="" class="aws"/>
3367                 </links>
3368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3369                         <actions>
3370                                 <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
3371                                         <context link="usr" field="home_ou" />
3372                                         <context link="ws" field="owning_lib" />
3373                                 </retrieve>
3374                                 <create permission="ADMIN_TOOLBAR" context_field="org">
3375                                         <context link="usr" field="home_ou" />
3376                                         <context link="ws" field="owning_lib" />
3377                                 </create>
3378                                 <update permission="ADMIN_TOOLBAR" context_field="org">
3379                                         <context link="usr" field="home_ou" />
3380                                         <context link="ws" field="owning_lib" />
3381                                 </update>
3382                                 <delete permission="ADMIN_TOOLBAR" context_field="org">
3383                                         <context link="usr" field="home_ou" />
3384                                         <context link="ws" field="owning_lib" />
3385                                 </delete>
3386                         </actions>
3387                 </permacrud>
3388         </class>
3389         <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">
3390                 <fields oils_persist:primary="name">
3391                         <field name="name" reporter:datatype="text"/>
3392                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3393                 </fields>
3394                 <links/>
3395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3396                         <actions>
3397                                 <create permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3398                                 <retrieve/>
3399                                 <update permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3400                                 <delete permission="ADMIN_USER_SETTING_GROUP" global_required="true"/>
3401                         </actions>
3402                 </permacrud>
3403         </class>
3404         <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">
3405                 <fields oils_persist:primary="name">
3406                         <field name="name" reporter:label="Name" reporter:datatype="text"/>
3407                         <field name="label" reporter:label="Label" reporter:datatype="text" oils_persist:i18n="true"/>
3408                         <field name="description" reporter:label="Description" reporter:datatype="text" oils_persist:i18n="true"/>
3409                         <field name="datatype" reporter:label="Datatype" reporter:datatype="text"/>
3410                         <field name="fm_class" reporter:label="Fieldmapper Class" reporter:datatype="text"/>
3411                         <field name="grp" reporter:label="Settings Group" reporter:datatype="link"/>
3412                         <field name="opac_visible" reporter:label="OPAC/Patron Visible" reporter:datatype="bool"/>
3413                         <field name="reg_default" reporter:label="Registration Default" reporter:datatype="text"/>
3414                 </fields>
3415                 <links>
3416                         <link field="name" reltype="has_many" key="name" map="" class="aus"/>
3417                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3418                 </links>
3419                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3420                         <actions>
3421                                 <create permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3422                                 <retrieve/>
3423                                 <update permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3424                                 <delete permission="ADMIN_USER_SETTING_TYPE" global_required="true"/>
3425                         </actions>
3426                 </permacrud>
3427         </class>
3428         <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">
3429                 <fields oils_persist:primary="name">
3430                         <field name="name" reporter:datatype="text"/>
3431                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
3432                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
3433                         <field name="datatype" reporter:datatype="text"/>
3434                         <field name="view_perm" reporter:datatype="link"/>
3435                         <field name="update_perm" reporter:datatype="link"/>
3436                         <field name="fm_class" reporter:datatype="text"/>
3437                         <field name="grp" reporter:datatype="link"/>
3438                 </fields>
3439                 <links>
3440                         <link field="name" reltype="has_many" key="name" map="" class="aous"/>
3441                         <link field="view_perm" reltype="has_a" key="id" map="" class="ppl"/>
3442                         <link field="update_perm" reltype="has_a" key="id" map="" class="ppl"/>
3443                         <link field="grp" reltype="has_a" key="name" map="" class="csg"/>
3444                 </links>
3445                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3446                         <actions>
3447                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3448                                 <retrieve/>
3449                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3450                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE" global_required="true"/>
3451                         </actions>
3452                 </permacrud>
3453         </class>
3454         <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">
3455                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_setting_id_seq">
3456                         <field name="id" />
3457                         <field name="name"  reporter:datatype="text"/>
3458                         <field name="org_unit" reporter:datatype="org_unit"/>
3459                         <field name="value"  reporter:datatype="text"/>
3460                 </fields>
3461                 <links>
3462                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3463                         <link field="name" reltype="has_a" key="name" map="" class="coust"/>
3464                 </links>
3465         </class>
3466         <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">
3467                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_note_id_seq">
3468                         <field reporter:label="Note Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
3469                         <field reporter:label="Note Creator" name="creator" reporter:datatype="link"/>
3470                         <field reporter:label="Note ID" name="id" reporter:datatype="id" />
3471                         <field reporter:label="Copy" name="owning_copy" reporter:datatype="link"/>
3472                         <field reporter:label="Is OPAC Visible?" name="pub" reporter:datatype="bool"/>
3473                         <field reporter:label="Note Title" name="title"  reporter:datatype="text"/>
3474                         <field reporter:label="Note Content" name="value"  reporter:datatype="text"/>
3475                 </fields>
3476                 <links>
3477                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
3478                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
3479                 </links>
3480         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3481             <actions>
3482                 <create permission="CREATE_COPY_NOTE">
3483                     <context link="owning_copy" field="circ_lib"/>
3484                 </create>
3485                 <retrieve permission="VIEW_COPY_NOTES">
3486                     <context link="owning_copy" field="circ_lib"/>
3487                 </retrieve>
3488                 <update permission="UPDATE_COPY_NOTE">
3489                     <context link="owning_copy" field="circ_lib"/>
3490                 </update>
3491                 <delete permission="DELETE_COPY_NOTE">
3492                     <context link="owning_copy" field="circ_lib"/>
3493                 </delete>
3494             </actions>
3495         </permacrud>
3496         </class>
3497         <class id="mfr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::full_rec" oils_persist:tablename="metabib.full_rec" reporter:label="Flattened MARC Fields">
3498                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.full_rec_id_seq">
3499                         <field reporter:label="Field ID" name="id" reporter:datatype="id" />
3500                         <field reporter:label="Indicator 1" name="ind1" oils_persist:primitive="string"  reporter:datatype="text"/>
3501                         <field reporter:label="Indicator 2" name="ind2" oils_persist:primitive="string"  reporter:datatype="text"/>
3502                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3503                         <field reporter:label="Subfield" name="subfield" oils_persist:primitive="string"  reporter:datatype="text"/>
3504                         <field reporter:label="Tag" name="tag"  reporter:datatype="text"/>
3505                         <field reporter:label="Normalized Value" name="value"  reporter:datatype="text"/>
3506                 </fields>
3507                 <links>
3508                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3509                 </links>
3510         </class>
3511         <class id="mmr" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::metarecord" oils_persist:tablename="metabib.metarecord" reporter:label="Metarecord">
3512                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_id_seq">
3513                         <field name="fingerprint"  reporter:datatype="text"/>
3514                         <field name="id" reporter:datatype="id" />
3515                         <field name="master_record" reporter:datatype="link"/>
3516                         <field name="mods"  reporter:datatype="text"/>
3517                         <field name="source_records" oils_persist:virtual="true" reporter:datatype="link"/>
3518                 </fields>
3519                 <links>
3520                         <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
3521                         <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
3522                 </links>
3523         </class>
3524         <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">
3525                 <fields oils_persist:primary="id" oils_persist:sequence="config.net_access_level_id_seq">
3526                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3527                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3528                 </fields>
3529                 <links/>
3530         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3531             <actions>
3532                 <create permission="CREATE_NET_ACCESS_LEVEL" global_required="true"/>
3533                 <retrieve/>
3534                 <update permission="UPDATE_NET_ACCESS_LEVEL" global_required="true"/>
3535                 <delete permission="DELETE_NET_ACCESS_LEVEL" global_required="true"/>
3536             </actions>
3537         </permacrud>
3538         </class>
3539         <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">
3540                 <fields oils_persist:primary="id" oils_persist:sequence="permission.perm_list_id_seq">
3541                         <field name="code"  reporter:datatype="text"/>
3542                         <field name="description"  reporter:datatype="text" oils_persist:i18n="true"/>
3543                         <field name="id" reporter:selector="code" reporter:datatype="id"/>
3544                 </fields>
3545                 <links/>
3546         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3547             <actions>
3548                 <create permission="CREATE_PERM" global_required="true"/>
3549                 <retrieve permission="CREATE_PERM UPDATE_PERM DELETE_PERM" global_required="true"/>
3550                 <update permission="UPDATE_PERM" global_required="true"/>
3551                 <delete permission="DELETE_PERM" global_required="true"/>
3552             </actions>
3553         </permacrud>
3554         </class>
3555         <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">
3556                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.metarecord_source_map_id_seq">
3557                         <field name="id" reporter:datatype="id" />
3558                         <field name="metarecord" reporter:datatype="link"/>
3559                         <field name="source" reporter:datatype="link"/>
3560                 </fields>
3561                 <links>
3562                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3563                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
3564                 </links>
3565         </class>
3566         <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">
3567                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.facet_entry_id_seq">
3568                         <field name="id" reporter:datatype="id" />
3569                         <field name="field" reporter:datatype="link"/>
3570                         <field name="source" reporter:datatype="link"/>
3571                         <field name="value"  reporter:datatype="text"/>
3572                 </fields>
3573                 <links>
3574                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3575                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3576                 </links>
3577         </class>
3578         <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">
3579                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_id_seq">
3580                         <field name="id" reporter:datatype="id" />
3581                         <field name="value" reporter:datatype="text"/>
3582                         <field name="def_maps" oils_persist:virtual="true" reporter:datatype="link"/>
3583                 </fields>
3584                 <links>
3585                         <link field="def_maps" reltype="has_many" key="entry" map="" class="mbedm"/>
3586                 </links>
3587         </class>
3588         <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">
3589                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_def_map_id_seq">
3590                         <field name="id" reporter:datatype="id" />
3591                         <field name="entry" reporter:datatype="link"/>
3592                         <field name="def" reporter:datatype="link"/>
3593                         <field name="source" reporter:datatype="link"/>
3594                 </fields>
3595                 <links>
3596                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3597                         <link field="def" reltype="has_a" key="id" map="" class="cmf"/>
3598                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3599                 </links>
3600         </class>
3601         <class id="mbeshm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="metabib::browse_entry_simple_heading_map" oils_persist:tablename="metabib.browse_entry_simple_heading_map" reporter:label="Combined Browse Entry Simple Authority Heading Map" oils_persist:readonly="true">
3602                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.browse_entry_simple_heading_map_id_seq">
3603                         <field name="id" reporter:datatype="id" />
3604                         <field name="entry" reporter:datatype="link"/>
3605                         <field name="simple_heading" reporter:datatype="link"/>
3606                 </fields>
3607                 <links>
3608                         <link field="entry" reltype="has_a" key="id" map="" class="mbe"/>
3609                         <link field="simple_heading" reltype="has_a" key="id" map="" class="ash"/>
3610                 </links>
3611         </class>
3612         <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">
3613                 <oils_persist:source_definition>
3614                         SELECT * FROM metabib.author_field_entry
3615                                                 UNION ALL
3616                         SELECT * FROM metabib.keyword_field_entry
3617                                                 UNION ALL
3618                         SELECT * FROM metabib.identifier_field_entry
3619                                                 UNION ALL
3620                         SELECT * FROM metabib.title_field_entry
3621                                                 UNION ALL
3622                         SELECT * FROM metabib.subject_field_entry
3623                                                 UNION ALL
3624                         SELECT * FROM metabib.series_field_entry
3625                 </oils_persist:source_definition>
3626                 <fields>
3627                         <field name="field" reporter:datatype="link"/>
3628                         <field name="id" reporter:datatype="id" />
3629                         <field name="source" reporter:datatype="link"/>
3630                         <field name="value"  reporter:datatype="text"/>
3631                 </fields>
3632                 <links>
3633                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3634                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3635                 </links>
3636         </class>
3637         <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">
3638                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.keyword_field_entry_id_seq">
3639                         <field name="field" reporter:datatype="link"/>
3640                         <field name="id" reporter:datatype="id" />
3641                         <field name="source" reporter:datatype="link"/>
3642                         <field name="value"  reporter:datatype="text"/>
3643                 </fields>
3644                 <links>
3645                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
3646                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
3647                 </links>
3648         </class>
3649         <class id="mcp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::cash_payment" oils_persist:tablename="money.cash_payment" reporter:label="Cash Payment">
3650                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3651                         <field name="accepting_usr" reporter:datatype="link"/>
3652                         <field name="amount" reporter:datatype="money" />
3653                         <field name="amount_collected" reporter:datatype="money" />
3654                         <field name="cash_drawer" reporter:datatype="link"/>
3655                         <field name="id" reporter:datatype="id" />
3656                         <field name="note"  reporter:datatype="text"/>
3657                         <field name="payment_ts" reporter:datatype="timestamp"/>
3658                         <field name="xact" reporter:datatype="link"/>
3659                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3660                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3661                 </fields>
3662                 <links>
3663                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3664                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3665                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
3666                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3667                 </links>
3668         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3669             <actions>
3670                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3671                     <context link="xact" jump="usr" field="home_ou"/>
3672                 </retrieve>
3673                         </actions>
3674                 </permacrud>
3675         </class>
3676         <class id="mfp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::forgive_payment" oils_persist:tablename="money.forgive_payment" reporter:label="Forgive Payment">
3677                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3678                         <field name="accepting_usr" reporter:datatype="link"/>
3679                         <field name="amount" reporter:datatype="money" />
3680                         <field name="amount_collected" reporter:datatype="money" />
3681                         <field name="id" reporter:datatype="id" />
3682                         <field name="note"  reporter:datatype="text"/>
3683                         <field name="payment_ts" reporter:datatype="timestamp"/>
3684                         <field name="xact" reporter:datatype="link"/>
3685                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3686                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3687                 </fields>
3688                 <links>
3689                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3690                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3691                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3692                 </links>
3693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3694             <actions>
3695                 <retrieve permission="VIEW_USER_TRANSACTIONS">
3696                     <context link="xact" jump="usr" field="home_ou"/>
3697                 </retrieve>
3698                         </actions>
3699                 </permacrud>
3700         </class>
3701         <class id="maa" controller="open-ils.cstore" oils_obj:fieldmapper="money::account_adjustment" oils_persist:tablename="money.account_adjustment" reporter:label="Account Adjustment">
3702                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
3703                         <field name="accepting_usr" reporter:datatype="link"/>
3704                         <field name="amount" reporter:datatype="money" />
3705                         <field name="amount_collected" reporter:datatype="money" />
3706                         <field name="id" reporter:datatype="id" />
3707                         <field name="note"  reporter:datatype="text"/>
3708                         <field name="payment_ts" reporter:datatype="timestamp"/>
3709                         <field name="xact" reporter:datatype="link"/>
3710                         <field name="billing" reporter:datatype="link"/>
3711                         <field name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
3712                         <field name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
3713                 </fields>
3714                 <links>
3715                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
3716                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
3717                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
3718                         <link field="billing" reltype="might_have" key="id" class="mb"/>
3719                 </links>
3720         </class>
3721         <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
3722                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.rec_descriptor_id_seq">
3723                         <field reporter:label="Audn" name="audience" oils_persist:primitive="string"  reporter:datatype="text"/>
3724                         <field reporter:label="BLvl" name="bib_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3725                         <field reporter:label="Cat Form" name="cat_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3726                         <field reporter:label="Character Encoding" name="char_encoding" oils_persist:primitive="string"  reporter:datatype="text"/>
3727                         <field reporter:label="Ctrl" name="control_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3728                         <field reporter:label="ELvl" name="enc_level" oils_persist:primitive="string"  reporter:datatype="text"/>
3729                         <field reporter:label="Descriptor ID" name="id" reporter:datatype="id" />
3730                         <field reporter:label="Form" name="item_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3731                         <field reporter:label="Lang" name="item_lang" oils_persist:primitive="string"  reporter:datatype="text"/>
3732                         <field reporter:label="Type" name="item_type" oils_persist:primitive="string"  reporter:datatype="text"/>
3733                         <field reporter:label="LitF" name="lit_form" oils_persist:primitive="string"  reporter:datatype="text"/>
3734                         <field reporter:label="Pub Status" name="pub_status" oils_persist:primitive="string"  reporter:datatype="text"/>
3735                         <field reporter:label="Bib Record Entry" name="record" reporter:datatype="link"/>
3736                         <field reporter:label="TMat" name="type_mat" oils_persist:primitive="string"  reporter:datatype="text"/>
3737                         <field reporter:label="Video Recording Format" name="vr_format" oils_persist:primitive="string"  reporter:datatype="text"/>
3738                         <field reporter:label="Date1" name="date1" oils_persist:primitive="string"  reporter:datatype="text"/>
3739                         <field reporter:label="Date2" name="date2" oils_persist:primitive="string"  reporter:datatype="text"/>
3740                 </fields>
3741                 <links>
3742                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
3743                         <link field="item_lang" reltype="has_a" key="code" map="" class="clm"/>
3744                         <link field="item_type" reltype="has_a" key="code" map="" class="citm"/>
3745                         <link field="bib_level" reltype="has_a" key="code" map="" class="cblvl"/>
3746                         <link field="item_form" reltype="has_a" key="code" map="" class="cifm"/>
3747                         <link field="audience" reltype="has_a" key="code" map="" class="cam"/>
3748                         <link field="lit_form" reltype="has_a" key="code" map="" class="clfm"/>
3749                 </links>
3750         </class>
3751
3752         <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">
3753                 <fields oils_persist:primary="id" oils_persist:sequence="config.standing_penalty_id_seq">
3754                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3755                         <field name="name"  reporter:datatype="text"/>
3756                         <field name="label"  reporter:datatype="text" oils_persist:i18n="true"/>
3757                         <field name="block_list" reporter:datatype="text"/>
3758                         <field name="staff_alert" reporter:datatype="bool"/>
3759                         <field name="org_depth" reporter:datatype="int"/>
3760                 </fields>
3761                 <links/>
3762         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3763             <actions>
3764                 <create permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3765                 <retrieve permission="ADMIN_STANDING_PENALTY VIEW_STANDING_PENALTY" global_required="true"/>
3766                 <update permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3767                 <delete permission="ADMIN_STANDING_PENALTY" global_required="true"/>
3768             </actions>
3769         </permacrud>
3770         </class>
3771         <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">
3772                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_penalty_threshold_id_seq">
3773                         <field name="id" reporter:selector="name" reporter:datatype="id" reporter:label="ID"/>
3774                         <field name="grp"  reporter:datatype="link" reporter:label="Group"/>
3775                         <field name="penalty"  reporter:datatype="link" reporter:label="Penalty"/>
3776                         <field name="threshold" reporter:datatype="float" reporter:label="Threshold"/>
3777                         <field name="org_unit" reporter:datatype="org_unit" reporter:label="Org Unit"/>
3778                 </fields>
3779                 <links>
3780                         <link field="penalty" reltype="has_a" key="id" map="" class="csp"/>
3781                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
3782                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3783         </links>
3784         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3785             <actions>
3786                 <create permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3787                 <retrieve permission="VIEW_GROUP_PENALTY_THRESHOLD ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3788                 <update permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3789                 <delete permission="ADMIN_GROUP_PENALTY_THRESHOLD" context_field='org_unit'/>
3790             </actions>
3791         </permacrud>
3792         </class>
3793         <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">
3794                 <fields oils_persist:primary="id" oils_persist:sequence="config.copy_status_id_seq">
3795                         <field name="holdable" reporter:datatype="bool"/>
3796                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
3797                         <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
3798                         <field name="opac_visible" reporter:datatype="bool"/>
3799             <field name="copy_active" reporter:datatype="bool"/>
3800             <field name="restrict_copy_delete" reporter:datatype="bool"/>
3801                 </fields>
3802                 <links/>
3803         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3804             <actions>
3805                 <create permission="CREATE_COPY_STATUS" global_required="true"/>
3806                 <retrieve/>
3807                 <update permission="UPDATE_COPY_STATUS" global_required="true"/>
3808                 <delete permission="DELETE_COPY_STATUS" global_required="true"/>
3809             </actions>
3810         </permacrud>
3811         </class>
3812         <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">
3813                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_standing_penalty_id_seq">
3814                         <field name="id" reporter:datatype="id" reporter:label="ID" />
3815                         <field name="set_date" reporter:datatype="timestamp" reporter:label="Set Date"/>
3816                         <field name="usr" reporter:datatype="link" reporter:label="User"/>
3817                         <field name="staff" reporter:datatype="link" reporter:label="Staff"/>
3818                         <field name="standing_penalty" reporter:datatype="link" reporter:label="Standing Penalty"/>
3819                         <field name="org_unit" reporter:datatype="link" reporter:label="Org Unit"/>
3820                         <field name="stop_date" reporter:datatype="timestamp" reporter:label="Stop Date"/>
3821                         <field name="note" reporter:datatype="text" reporter:label="Note"/>
3822                 </fields>
3823                 <links>
3824                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3825                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
3826                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
3827                         <link field="standing_penalty" reltype="has_a" key="id" map="" class="csp"/>
3828                 </links>
3829                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3830                         <actions>
3831                                 <create permission="UPDATE_USER"><context link="usr" field="home_ou"/></create>
3832                                 <retrieve permission="VIEW_USER"><context link="usr" field="home_ou"/></retrieve>
3833                                 <update permission="UPDATE_USER"><context link="usr" field="home_ou"/></update>
3834                                 <delete permission="UPDATE_USER"><context link="usr" field="home_ou"/></delete>
3835                         </actions>
3836                 </permacrud>
3837         </class>
3838         <class id="aua" controller="open-ils.cstore" oils_obj:fieldmapper="actor::user_address" oils_persist:tablename="actor.usr_address" reporter:label="User Address">
3839                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_address_id_seq">
3840                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
3841                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3842                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3843                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3844                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
3845                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3846                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3847                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3848                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3849                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
3850                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
3851                         <field reporter:label="Within City Limits?" name="within_city_limits" reporter:datatype="bool"/>
3852                         <field reporter:label="Replaces" name="replaces" reporter:datatype="link"/>
3853                         <field reporter:label="Pending" name="pending" reporter:datatype="bool"/>
3854                 </fields>
3855                 <links>
3856                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3857                         <link field="replaces" reltype="has_a" key="id" map="" class="aua"/>
3858                 </links>
3859         </class>
3860         <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">
3861                 <fields oils_persist:primary="id" oils_persist:sequence="actor.address_alert_id_seq">
3862                         <field reporter:label="Address Alert ID" name="id" reporter:datatype="id" />
3863                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" oils_obj:required="true"/>
3864                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
3865                         <field reporter:label="Match All Fields" name="match_all" reporter:datatype="bool" />
3866                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text" oils_obj:required="true"/>
3867                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
3868                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
3869                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
3870                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
3871                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
3872                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
3873                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
3874                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="bool"/>
3875                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="bool"/>
3876                 </fields>
3877                 <links>
3878                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
3879                 </links>
3880                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3881                         <actions>
3882                                 <create   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3883                                 <retrieve context_field='owner' permission="ADMIN_ADDRESS_ALERT VIEW_ADDRESS_ALERT CREATE_USER"/>
3884                                 <update   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3885                                 <delete   context_field='owner' permission="ADMIN_ADDRESS_ALERT"/>
3886                         </actions>
3887                 </permacrud>
3888         </class>
3889
3890
3891         <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">
3892                 <fields oils_persist:primary="id" oils_persist:sequence="actor.usr_saved_search_id_seq">
3893                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
3894                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
3895                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
3896                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
3897                         <field reporter:label="Query Text" name="query_text" reporter:datatype="text"/>
3898                         <field reporter:label="Query Type" name="query_type" reporter:datatype="text"/>
3899                         <field reporter:label="Target" name="target" reporter:datatype="text"/>
3900                 </fields>
3901                 <links>
3902                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
3903                 </links>
3904         </class>
3905
3906         <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">
3907                 <fields oils_persist:primary="id" oils_persist:sequence="asset.call_number_note_id_seq">
3908                         <field name="call_number" />
3909                         <field name="create_date" reporter:datatype="timestamp"/>
3910                         <field name="creator" reporter:datatype="link"/>
3911                         <field name="id" reporter:datatype="id" />
3912                         <field name="pub" reporter:datatype="bool"/>
3913                         <field name="title"  reporter:datatype="text"/>
3914                         <field name="value"  reporter:datatype="text"/>
3915                 </fields>
3916                 <links>
3917                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
3918                 </links>
3919         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3920             <actions>
3921                 <create permission="CREATE_VOLUME_NOTE">
3922                     <context link="call_number" field="owning_lib"/>
3923                 </create>
3924                 <retrieve permission="VIEW_VOLUME_NOTES">
3925                     <context link="call_number" field="owning_lib"/>
3926                 </retrieve>
3927                 <update permission="UPDATE_VOLUME_NOTE">
3928                     <context link="call_number" field="owning_lib"/>
3929                 </update>
3930                 <delete permission="DELETE_VOLUME_NOTE">
3931                     <context link="call_number" field="owning_lib"/>
3932                 </delete>
3933             </actions>
3934         </permacrud>
3935         </class>
3936         <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">
3937                 <fields oils_persist:primary="id" oils_persist:sequence="authority.record_note_id_seq">
3938                         <field name="create_date" reporter:datatype="timestamp"/>
3939                         <field name="creator" reporter:datatype="link"/>
3940                         <field name="edit_date" reporter:datatype="timestamp"/>
3941                         <field name="editor" reporter:datatype="link"/>
3942                         <field name="id" reporter:datatype="id" />
3943                         <field name="record" reporter:datatype="link"/>
3944                         <field name="value" reporter:datatype="text"/>
3945                 </fields>
3946                 <links>
3947                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
3948                 </links>
3949         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
3950             <actions>
3951                 <create permission="CREATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3952                 <retrieve/>
3953                 <update permission="UPDATE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3954                 <delete permission="DELETE_AUTHORITY_RECORD_NOTE" global_required='true'/>
3955             </actions>
3956         </permacrud>
3957         </class>
3958         <class id="ocirccount" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_count" reporter:label="Open Circulation Count" oils_persist:readonly="true">
3959         <oils_persist:source_definition>
3960 SELECT  usr,
3961         SUM(
3962             CASE
3963                 WHEN (
3964                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
3965                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3966                 ) THEN 1
3967                 ELSE 0
3968             END
3969         ) AS out,
3970
3971         SUM(
3972             CASE
3973                 WHEN (
3974                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
3975                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
3976                 ) THEN 1
3977                 ELSE 0
3978             END
3979         ) AS overdue,
3980
3981         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN 1 ELSE 0 END) AS lost,
3982         SUM( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN 1 ELSE 0 END) AS claims_returned,
3983         SUM( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN 1 ELSE 0 END) AS long_overdue
3984   FROM  action.circulation
3985   WHERE checkin_time IS NULL
3986   GROUP BY 1
3987         </oils_persist:source_definition>
3988         <fields oils_persist:primary="usr">
3989             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
3990             <field reporter:label="Out" name="out" reporter:datatype="text"/>
3991             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
3992             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
3993             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
3994             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
3995         </fields>
3996         <links>
3997             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
3998         </links>
3999         </class>
4000         <class id="ocirclist" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circ_list" reporter:label="Open Circulation List" oils_persist:readonly="true">
4001         <oils_persist:source_definition>
4002 SELECT  usr,
4003         STRING_AGG(
4004             CASE
4005                 WHEN (
4006                     ((fine_interval >= '1 day' AND due_date >= 'today') OR (fine_interval &lt; '1 day'  AND due_date > 'now'))
4007                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4008                 ) THEN id::TEXT
4009                 ELSE '0'
4010             END
4011         ,',') AS out,
4012
4013         STRING_AGG(
4014             CASE
4015                 WHEN (
4016                     ((fine_interval >= '1 day' AND due_date &lt; 'today') OR (fine_interval &lt; '1 day'  AND due_date &lt; 'now'))
4017                     AND (stop_fines IS NULL OR stop_fines NOT IN ('LOST','CLAIMSRETURNED','LONGOVERDUE'))
4018                 ) THEN id::TEXT
4019                 ELSE '0'
4020             END
4021         ,',') AS overdue,
4022
4023         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LOST') THEN id::TEXT ELSE '0' END,',') AS lost,
4024         STRING_AGG( CASE WHEN stop_fines = 'CLAIMSRETURNED' THEN id::TEXT ELSE '0' END,',') AS claims_returned,
4025         STRING_AGG( CASE WHEN (xact_finish IS NULL AND stop_fines = 'LONGOVERDUE') THEN id::TEXT ELSE '0' END,',') AS long_overdue
4026   FROM  action.circulation
4027   WHERE checkin_time IS NULL
4028   GROUP BY 1
4029         </oils_persist:source_definition>
4030         <fields oils_persist:primary="usr">
4031             <field reporter:label="User ID" name="usr" reporter:datatype="link"/>
4032             <field reporter:label="Out" name="out" reporter:datatype="text"/>
4033             <field reporter:label="Overdue" name="overdue" reporter:datatype="text"/>
4034             <field reporter:label="Lost" name="lost" reporter:datatype="text"/>
4035             <field reporter:label="Claims Returned" name="claims_returned" reporter:datatype="text"/>
4036             <field reporter:label="Long Overdue" name="long_overdue" reporter:datatype="text"/>
4037         </fields>
4038         <links>
4039             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4040         </links>
4041         </class>
4042         <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">
4043                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4044                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4045                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4046                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4047                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4048                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4049                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4050                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4051                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4052                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4053                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4054                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4055                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4056                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4057                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4058                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4059                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4060                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4061                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4062                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4063                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4064                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4065                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4066                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
4067                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4068                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4069                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4070                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4071                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4072                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4073                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4074                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4075                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4076                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4077                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4078                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4079                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4080                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4081                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4082                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4083                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4084                 </fields>
4085                 <links>
4086                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4087                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4088                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4089                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4090                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4091                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4092                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4093                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4094                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4095                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4096                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4097                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4098                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4099                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4100                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4101                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4102                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4103                         <link field="parent_circ" reltype="has_a" key="id" map="" class="circ"/>
4104                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4105                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4106                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4107                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4108                 </links>
4109                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4110                         <actions>
4111                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
4112                         </actions>
4113                 </permacrud>
4114         </class>
4115         <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">
4116                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4117                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4118                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4119                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4120                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4121                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4122                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4123                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4124                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4125                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4126                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4127                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4128                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4129                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4130                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4131                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4132                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4133                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4134                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4135                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4136                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4137                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4138                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4139                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4140                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4141                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4142                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4143                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4144                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4145                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4146                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4147                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4148                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4149                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4150                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4151                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4152                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4153                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4154                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4155                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4156                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4157                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4158                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4159                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4160                 </fields>
4161                 <links>
4162                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4163                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4164                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4165                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4166                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4167                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4168                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4169                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4170                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4171                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4172                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4173                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4174                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4175                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4176                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4177                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4178                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4179                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4180                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4181                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4182                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4183                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4184                 </links>
4185         </class>
4186         <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">
4187                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4188                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
4189                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
4190                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
4191                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
4192                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
4193                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
4194                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
4195                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
4196                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
4197                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4198                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
4199                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
4200                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
4201                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
4202                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
4203                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
4204                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
4205                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
4206                         <field reporter:label="Grace Period" name="grace_period" reporter:datatype="interval" />
4207                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
4208                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
4209                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
4210                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
4211                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
4212                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
4213                         <field reporter:label="Record Creation Date/Time" name="create_time" reporter:datatype="timestamp" />
4214                         <field reporter:label="Workstation" name="workstation" reporter:datatype="link"/>
4215                         <field reporter:label="Checkin Workstation" name="checkin_workstation" reporter:datatype="link"/>
4216                         <field reporter:label="Checkin Scan Date/Time" name="checkin_scan_time" reporter:datatype="timestamp" />
4217                         <field reporter:label="Parent Circulation" name="parent_circ" reporter:datatype="link"/>
4218                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4219                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4220                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
4221                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="text"/>
4222                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4223                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4224                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
4225                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
4226                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
4227                         <field reporter:label="Call Number" name="copy_call_number" reporter:datatype="link"/>
4228                         <field reporter:label="Shelving Location" name="copy_location" reporter:datatype="link"/>
4229                         <field reporter:label="Copy Owning Library" name="copy_owning_lib" reporter:datatype="link"/>
4230                         <field reporter:label="Copy Circulating Library" name="copy_circ_lib" reporter:datatype="link"/>
4231                         <field reporter:label="Bib Record" name="copy_bib_record" reporter:datatype="link"/>
4232                         <field reporter:label="Archived Patron Stat-Cat Entries" name="aaactsc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4233                         <field reporter:label="Archived Copy Stat-Cat Entries" name="aaasc_entries" oils_persist:virtual="true" reporter:datatype="link"/>
4234                 </fields>
4235                 <links>
4236                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
4237                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
4238                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
4239                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4240                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
4241                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4242                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4243                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4244                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
4245                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
4246                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
4247                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
4248                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4249                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4250                         <link field="copy_call_number" reltype="has_a" key="id" map="" class="acn"/>
4251                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
4252                         <link field="copy_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4253                         <link field="copy_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
4254                         <link field="copy_bib_record" reltype="has_a" key="id" map="" class="bre"/>
4255                         <link field="workstation" reltype="has_a" key="id" map="" class="aws"/>
4256                         <link field="checkin_workstation" reltype="has_a" key="id" map="" class="aws"/>
4257                         <link field="parent_circ" reltype="might_have" key="id" map="" class="circ"/>
4258                         <link field="renewals" reltype="has_many" key="parent_circ" map="" class="circ"/>
4259                         <link field="aaactsc_entries" reltype="has_many" key="xact" map="" class="aaactsc"/>
4260                         <link field="aaasc_entries" reltype="has_many" key="xact" map="" class="aaasc"/>
4261                 </links>
4262         </class>
4263
4264         <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">
4265                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_type_id_seq">
4266                         <field reporter:label="Resource Type ID" name="id" reporter:datatype="id" reporter:selector="name"/>
4267                         <field reporter:label="Resource Type Name" name="name" reporter:datatype="text"/>
4268                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4269                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4270                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4271                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4272                         <field reporter:label="Catalog Item" name="catalog_item" reporter:datatype="bool"/>
4273                         <field reporter:label="Bibliographic Record" name="record" reporter:datatype="link"/>
4274                         <field reporter:label="Transferable" name="transferable" reporter:datatype="bool"/>
4275                         <field reporter:label="Inter-booking and Inter-circulation Interval" name="elbow_room" reporter:datatype="interval"/>
4276                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
4277                         <field reporter:label="Resource Attributes" name="resource_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
4278                         <field reporter:label="Target Resource Types" name="tgt_rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
4279                 </fields>
4280                 <links>
4281                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4282                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4283                         <link field="resources" reltype="has_many" key="type" map="" class="brsrc"/>
4284                         <link field="resource_attrs" reltype="has_many" key="type" map="" class="bra"/>
4285                         <link field="tgt_rsrc_types" reltype="has_many" key="type" map="" class="bresv"/>
4286                 </links>
4287                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4288                         <actions>
4289                                 <create permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4290                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4291                                 <update permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4292                                 <delete permission="ADMIN_BOOKING_RESOURCE_TYPE" context_field='owner'/>
4293                         </actions>
4294                 </permacrud>
4295         </class>
4296
4297         <class id="brsrc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::resource" oils_persist:tablename="booking.resource" reporter:label="Resource">
4298                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_id_seq">
4299                         <field reporter:label="Resource ID" name="id" reporter:datatype="id" reporter:selector="barcode" />
4300                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4301                         <field reporter:label="Resource Type" name="type" reporter:datatype="link"/>
4302                         <field reporter:label="Overbook" name="overbook" reporter:datatype="bool"/>
4303                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
4304                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
4305                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
4306                         <field reporter:label="User Fee" name="user_fee" reporter:datatype="money"/>
4307                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4308                         <field reporter:label="Reservation Target Resources" name="tgt_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4309                         <field reporter:label="Reservation Current Resources" name="curr_rsrcs" oils_persist:virtual="true" reporter:datatype="link"/>
4310                         <field reporter:label="Catalog Item" name="catalog_item" oils_persist:virtual="true" reporter:datatype="link"/>
4311                 </fields>
4312                 <links>
4313                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4314                         <link field="type" reltype="has_a" key="id" map="" class="brt"/>
4315                         <link field="attr_maps" reltype="has_many" key="resource" map="" class="bram"/>
4316                         <link field="tgt_rsrcs" reltype="has_many" key="targeted_resource" map="" class="bresv"/>
4317                         <link field="curr_rsrcs" reltype="has_many" key="current_resource" map="" class="bresv"/>
4318                 </links>
4319                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4320                         <actions>
4321                                 <create permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4322                                 <retrieve permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4323                                 <update permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4324                                 <delete permission="ADMIN_BOOKING_RESOURCE" context_field='owner'/>
4325                         </actions>
4326                 </permacrud>
4327         </class>
4328         
4329         <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">
4330                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_id_seq">
4331                         <field reporter:label="Resource Attribute ID" name="id" reporter:datatype="id" reporter:selector="name" />
4332                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4333                         <field reporter:label="Resource Attribute Name" name="name" reporter:datatype="text"/>
4334                         <field reporter:label="Resource Type" name="resource_type" reporter:datatype="link"/>
4335                         <field reporter:label="Is Required" name="required" reporter:datatype="bool"/>
4336                         <field reporter:label="Valid Values" name="valid_values" oils_persist:virtual="true" reporter:datatype="link"/>
4337                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4338                 </fields>
4339                 <links>
4340                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4341                         <link field="resource_type" reltype="has_a" key="id" map="" class="brt"/>
4342                         <link field="valid_values" reltype="has_many" key="attr" map="" class="brav"/>
4343                         <link field="attr_maps" reltype="has_many" key="attr" map="" class="bram"/>
4344                 </links>
4345                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4346                         <actions>
4347                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4348                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4349                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4350                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR" context_field='owner'/>
4351                         </actions>
4352                 </permacrud>
4353         </class>
4354         
4355         <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">
4356                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_value_id_seq">
4357                         <field reporter:label="Resource Attribute Value ID" name="id" reporter:datatype="id" reporter:selector="valid_value" />
4358                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
4359                         <field reporter:label="Resource Attribute" name="attr" reporter:datatype="link"/>
4360                         <field reporter:label="Valid Value" name="valid_value" reporter:datatype="text"/>
4361                         <field reporter:label="Resource Attribute Maps" name="attr_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4362                         <field reporter:label="Resource Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4363                 </fields>
4364                 <links>
4365                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4366                         <link field="attr" reltype="has_a" key="id" map="" class="bra"/>
4367                         <link field="attr_maps" reltype="has_many" key="id" map="" class="bram"/>
4368                         <link field="attr_val_maps" reltype="has_many" key="attr_value" map="" class="bravm"/>
4369                 </links>
4370                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4371                         <actions>
4372                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4373                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4374                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4375                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_VALUE" context_field='owner'/>
4376                         </actions>
4377                 </permacrud>
4378         </class>
4379         
4380         <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">
4381                 <fields oils_persist:primary="id" oils_persist:sequence="booking.resource_attr_map_id_seq">
4382                         <field reporter:label="Resource Attribute Map ID" name="id" reporter:datatype="id"/>
4383                         <field reporter:label="Resource" name="resource" reporter:datatype="link"/>
4384                         <field reporter:label="Resource Attribute" name="resource_attr" reporter:datatype="link"/>
4385                         <field reporter:label="Attribute Value" name="value" reporter:datatype="link"/>
4386                 </fields>
4387                 <links>
4388                         <link field="resource" reltype="has_a" key="id" map="" class="brsrc"/>
4389                         <link field="resource_attr" reltype="has_a" key="id" map="" class="bra"/>
4390                         <link field="value" reltype="has_a" key="id" map="" class="brav"/>
4391                 </links>
4392                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4393                         <actions>
4394                                 <create permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4395                     <context link="resource" field="owner" />
4396                 </create>
4397                                 <retrieve permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4398                     <context link="resource" field="owner" />
4399                 </retrieve>
4400                                 <update permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4401                     <context link="resource" field="owner" />
4402                 </update>
4403                                 <delete permission="ADMIN_BOOKING_RESOURCE_ATTR_MAP">
4404                     <context link="resource" field="owner" />
4405                 </delete>
4406                         </actions>
4407                 </permacrud>
4408         </class>
4409         
4410         <class id="bresv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="booking::reservation" oils_persist:tablename="booking.reservation" reporter:label="Reservation">
4411                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
4412                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
4413                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
4414                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
4415                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
4416                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
4417                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
4418                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
4419                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
4420                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
4421                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
4422                         <field reporter:label="Request Time" name="request_time" reporter:datatype="timestamp"/>
4423                         <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
4424                         <field reporter:label="End Time" name="end_time" reporter:datatype="timestamp"/>
4425                         <field reporter:label="Capture Time" name="capture_time" reporter:datatype="timestamp"/>
4426                         <field reporter:label="Cancel Time" name="cancel_time" reporter:datatype="timestamp"/>
4427                         <field reporter:label="Pickup Time" name="pickup_time" reporter:datatype="timestamp"/>
4428                         <field reporter:label="Return Time" name="return_time" reporter:datatype="timestamp"/>
4429                         <field reporter:label="Booking Interval" name="booking_interval" reporter:datatype="interval"/>
4430                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
4431                         <field reporter:label="Fine Amount" name="fine_amount" reporter:datatype="money"/>
4432                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money"/>
4433                         <field reporter:label="Target Resource Type" name="target_resource_type" reporter:datatype="link"/>
4434                         <field reporter:label="Target Resource" name="target_resource" reporter:datatype="link"/>
4435                         <field reporter:label="Current Resource" name="current_resource" reporter:datatype="link"/>
4436                         <field reporter:label="Request Library" name="request_lib" reporter:datatype="link"/>
4437                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link"/>
4438                         <field reporter:label="Capture Staff" name="capture_staff" reporter:datatype="link"/>
4439                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
4440                         <field reporter:label="Attribute Value Maps" name="attr_val_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4441                 </fields>
4442                 <links>
4443                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
4444                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
4445                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
4446                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
4447                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
4448                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
4449                         <link field="target_resource_type" reltype="has_a" key="id" map="" class="brt"/>
4450                         <link field="target_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4451                         <link field="current_resource" reltype="has_a" key="id" map="" class="brsrc"/>
4452                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
4453                         <link field="pickup_lib" reltype="might_have" key="id" map="" class="aou"/>
4454                         <link field="capture_staff" reltype="might_have" key="id" map="" class="au"/>
4455                         <link field="attr_val_maps" reltype="has_many" key="reservation" map="" class="bravm"/>
4456                 </links>
4457                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4458                         <actions>
4459                                 <create permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4460                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4461                                 <update permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4462                                 <delete permission="ADMIN_BOOKING_RESERVATION" global_required='true'/>
4463                         </actions>
4464                 </permacrud>
4465         </class>
4466         
4467         <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">
4468                 <fields oils_persist:primary="id" oils_persist:sequence="booking.reservation_attr_value_map_id_seq">
4469                         <field reporter:label="Reservation Attribute Value Map" name="id" reporter:datatype="id"/>
4470                         <field reporter:label="Reservation" name="reservation" reporter:datatype="link"/>
4471                         <field reporter:label="Attribute Map" name="attr_value" reporter:datatype="link"/>
4472                 </fields>
4473                 <links>
4474                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
4475                         <link field="attr_value" reltype="has_a" key="id" map="" class="brav"/>
4476                 </links>
4477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4478                         <actions>
4479                                 <create permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4480                                 <retrieve permission="STAFF_LOGIN" global_required='true'/>
4481                                 <update permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4482                                 <delete permission="ADMIN_BOOKING_RESERVATION_ATTR_MAP" global_required='true'/>
4483                         </actions>
4484                 </permacrud>
4485         </class>
4486
4487         <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">
4488                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_id_seq">
4489                         <field name="bucket" reporter:datatype="link"/>
4490                         <field name="id" reporter:datatype="id" />
4491                         <field name="target_call_number" reporter:datatype="link" />
4492                         <field name="create_time" reporter:datatype="timestamp" />
4493                         <field name="pos" reporter:datatype="int" />
4494                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
4495                 </fields>
4496                 <links>
4497                         <link field="target_call_number" reltype="has_a" key="id" map="" class="acn"/>
4498                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
4499             <link field="notes" reltype="has_many" map="" key="item" class="ccnbin"/>
4500                 </links>
4501         </class>
4502         <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">
4503                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_item_note_id_seq">
4504                         <field name="id" reporter:datatype="id" />
4505                         <field name="item" reporter:datatype="link"/>
4506                         <field name="note" reporter:datatype="text" />
4507                 </fields>
4508                 <links>
4509                         <link field="item" reltype="has_a" key="id" map="" class="ccnbi"/>
4510                 </links>
4511         </class>
4512         <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">
4513                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_id_seq">
4514                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
4515                         <field name="btype" reporter:datatype="text"/>
4516                         <field name="id" reporter:datatype="id" />
4517                         <field name="name" reporter:datatype="text"/>
4518                         <field name="description" reporter:datatype="text"/>
4519                         <field name="owner" reporter:datatype="link"/>
4520                         <field name="pub" reporter:datatype="bool"/>
4521                         <field name="create_time" reporter:datatype="timestamp" />
4522                 </fields>
4523                 <links>
4524                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
4525                         <link field="items" reltype="has_many" key="bucket" map="" class="cbrebi"/>
4526                 </links>
4527         </class>
4528         <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">
4529                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_note_id_seq">
4530                         <field name="id" reporter:datatype="id" />
4531                         <field name="bucket" reporter:datatype="link"/>
4532                         <field name="note" reporter:datatype="text" />
4533                 </fields>
4534                 <links>
4535                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
4536                 </links>
4537         </class>
4538         <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">
4539                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_copy_map_id_seq">
4540                         <field name="hold" reporter:datatype="link"/>
4541                         <field name="id" reporter:datatype="id" />
4542                         <field name="target_copy" reporter:datatype="link"/>
4543                         <field name="proximity" reporter:datatype="number"/>
4544                 </fields>
4545                 <links>
4546                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4547                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
4548                 </links>
4549         </class>
4550         <class id="ahn" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::hold_notification" oils_persist:tablename="action.hold_notification" reporter:label="Hold Notification">
4551                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_notification_id_seq">
4552                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
4553                         <field reporter:label="Notification ID" name="id" reporter:datatype="id" />
4554                         <field reporter:label="Notification Method" name="method"  reporter:datatype="text"/>
4555                         <field reporter:label="Notification Note" name="note"  reporter:datatype="text"/>
4556                         <field reporter:label="Notifying Staff" name="notify_staff" reporter:datatype="link"/>
4557                         <field reporter:label="Notification Date/Time" name="notify_time" reporter:datatype="timestamp"/>
4558                 </fields>
4559                 <links>
4560                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
4561                         <link field="notify_staff" reltype="has_a" key="id" map="" class="au"/>
4562                 </links>
4563         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4564             <actions>
4565                 <create permission="CREATE_HOLD_NOTIFICATION">
4566                                         <context link="hold" jump="usr" field="home_ou" />
4567                                 </create>
4568                 <retrieve permission="VIEW_HOLD_NOTIFICATION">
4569                                         <context link="hold" jump="usr" field="home_ou" />
4570                                 </retrieve>
4571                 <update permission="CREATE_HOLD_NOTIFICATION">
4572                                         <context link="hold" jump="usr" field="home_ou" />
4573                                 </update>
4574                 <delete permission="CREATE_HOLD_NOTIFICATION">
4575                                         <context link="hold" jump="usr" field="home_ou" />
4576                                 </delete>
4577             </actions>
4578         </permacrud>
4579         </class>
4580         <class id="acpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="asset::copy_location" oils_persist:tablename="asset.copy_location" reporter:label="Copy/Shelving Location"  oils_persist:field_safe="true">
4581                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_id_seq">
4582                         <field reporter:label="Can Circulate?" name="circulate"  reporter:datatype="bool"/>
4583                         <field reporter:label="Is Holdable?" name="holdable" reporter:datatype="bool"/>
4584                         <field reporter:label="Hold Capture Requires Verification" name="hold_verify" reporter:datatype="bool"/>
4585                         <field reporter:label="Location ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4586                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4587                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4588                         <field reporter:label="Owning Org Unit" name="owning_lib"  reporter:datatype="org_unit"/>
4589                         <field reporter:label="Copy Location Orders" name="orders" oils_persist:virtual="true" reporter:datatype="link"/>
4590                         <field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
4591                         <field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
4592                         <field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
4593                         <field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
4594                         <field reporter:label="Is Deleted?" name="deleted" reporter:datatype="bool" />
4595                 </fields>
4596                 <links>
4597                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4598                         <link field="distribution_formula_entries" reltype="has_many" key="location" map="" class="acqdfe"/>
4599                         <link field="orders" reltype="has_many" key="location" map="" class="acplo"/>
4600                         <link field="copies" reltype="has_many" key="location" map="" class="acp"/>
4601                 </links>
4602         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4603             <actions>
4604                 <create permission="CREATE_COPY_LOCATION" context_field="owning_lib"/>
4605                 <retrieve/>
4606                 <update permission="UPDATE_COPY_LOCATION" context_field="owning_lib"/>
4607                 <delete permission="DELETE_COPY_LOCATION" context_field="owning_lib"/>
4608             </actions>
4609         </permacrud>
4610         </class>
4611         <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">
4612                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_id_seq">
4613                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4614                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
4615                         <field reporter:label="Is OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
4616                         <field reporter:label="Owning Org Unit" name="owner"  reporter:datatype="org_unit"/>
4617             <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4618             <field reporter:label="Display Above Orgs" name="top" reporter:datatype="bool"/>
4619             <field reporter:label="Copy Location Mappings" name="location_maps" oils_persist:virtual="true" reporter:datatype="link"/>
4620                 </fields>
4621                 <links>
4622                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
4623                         <link field="location_maps" reltype="has_many" key="lgroup" map="" class="acplgm"/>
4624                 </links>
4625         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4626             <actions>
4627                 <create permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4628                 <retrieve/>
4629                 <update permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4630                 <delete permission="ADMIN_COPY_LOCATION_GROUP" context_field="owner"/>
4631             </actions>
4632         </permacrud>
4633         </class>
4634         <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">
4635                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_group_map_id_seq">
4636                         <field reporter:label="ID" name="id" reporter:selector="name" reporter:datatype="id"/>
4637             <field reporter:label="Group" name="lgroup" reporter:datatype="link"/>
4638             <field reporter:label="Copy Location" name="location" reporter:datatype="link"/>
4639                 </fields>
4640                 <links>
4641                         <link field="lgroup" reltype="has_a" key="id" map="" class="acplg"/>
4642                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4643                 </links>
4644         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4645             <actions>
4646                 <create permission="ADMIN_COPY_LOCATION_GROUP">
4647                                         <context link="lgroup" field="owner" />
4648                 </create>
4649                 <retrieve/>
4650                 <update permission="ADMIN_COPY_LOCATION_GROUP">
4651                                         <context link="lgroup" field="owner" />
4652                 </update>
4653                 <delete permission="ADMIN_COPY_LOCATION_GROUP">
4654                                         <context link="lgroup" field="owner" />
4655                 </delete>
4656             </actions>
4657         </permacrud>
4658         </class>
4659
4660     <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">
4661         <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_location_order_id_seq">
4662             <field reporter:label="Location Order ID" name="id" reporter:datatype="id"/>
4663             <field reporter:label="Location ID" name="location" reporter:datatype="link"/>
4664             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit"/>
4665             <field reporter:label="Position" name="position" reporter:datatype="int"/>
4666         </fields>
4667         <links>
4668             <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
4669             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
4670         </links>
4671         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4672             <actions>
4673                                 <create permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4674                 <retrieve/>
4675                                 <update permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4676                                 <delete permission="ADMIN_COPY_LOCATION_ORDER" context_field="org"/>
4677             </actions>
4678         </permacrud>
4679     </class>
4680
4681         <class id="svr" controller="open-ils.cstore" oils_obj:fieldmapper="serial::virtual_record" oils_persist:virtual="true" reporter:label="Serial Virtual Record">
4682                 <fields>
4683                         <field name="sre_id" oils_persist:virtual="true" />
4684                         <field name="location" oils_persist:virtual="true" />
4685                         <field name="owning_lib" oils_persist:virtual="true" />
4686                         <field name="basic_holdings" oils_persist:virtual="true" />
4687                         <field name="basic_holdings_add" oils_persist:virtual="true" />
4688                         <field name="supplement_holdings" oils_persist:virtual="true" />
4689                         <field name="supplement_holdings_add" oils_persist:virtual="true" />
4690                         <field name="index_holdings" oils_persist:virtual="true" />
4691                         <field name="index_holdings_add" oils_persist:virtual="true" />
4692                         <field name="online" oils_persist:virtual="true" />
4693                         <field name="missing" oils_persist:virtual="true" />
4694                         <field name="incomplete" oils_persist:virtual="true" />
4695                 </fields>
4696         </class>
4697
4698         <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">
4699                 <fields oils_persist:primary="id" oils_persist:sequence="serial.record_entry_id_seq">
4700                         <field reporter:label="Is Active" name="active" reporter:datatype="bool"/>
4701                         <field reporter:label="Bib Record" name="record" reporter:datatype="link"/>
4702                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4703                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4704                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
4705                         <field reporter:label="Edit date" name="edit_date" reporter:datatype="timestamp"/>
4706                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4707                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4708                         <field reporter:label="Last Transaction ID" name="last_xact_id" reporter:datatype="text"/>
4709                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
4710                         <field reporter:label="Source" name="source" reporter:datatype="int"/>
4711                         <field reporter:label="Owning Org Unit" name="owning_lib" reporter:datatype="org_unit"/>
4712                 </fields>
4713                 <links>
4714                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
4715                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4716                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4717                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4718                 </links>
4719                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4720                         <actions>
4721                                 <create permission="CREATE_MFHD_RECORD" context_field="owning_lib"/>
4722                                 <retrieve/>
4723                                 <update permission="UPDATE_MFHD_RECORD" context_field="owning_lib"/>
4724                                 <delete permission="DELETE_MFHD_RECORD" context_field="owning_lib"/>
4725                         </actions>
4726                 </permacrud>
4727         </class>
4728
4729         <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">
4730                 <fields oils_persist:primary="id" oils_persist:sequence="serial.caption_and_pattern_id_seq">
4731                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4732                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4733                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
4734                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4735                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4736                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4737                         <field reporter:label="Active?" name="active" reporter:datatype="bool"/>
4738                         <field reporter:label="Pattern Code" name="pattern_code" reporter:datatype="text"/>
4739                         <field reporter:label="Enum 1" name="enum_1" reporter:datatype="text"/>
4740                         <field reporter:label="Enum 2" name="enum_2" reporter:datatype="text"/>
4741                         <field reporter:label="Enum 3" name="enum_3" reporter:datatype="text"/>
4742                         <field reporter:label="Enum 4" name="enum_4" reporter:datatype="text"/>
4743                         <field reporter:label="Enum 5" name="enum_5" reporter:datatype="text"/>
4744                         <field reporter:label="Enum 6" name="enum_6" reporter:datatype="text"/>
4745                         <field reporter:label="Chron 1" name="chron_1" reporter:datatype="text"/>
4746                         <field reporter:label="Chron 2" name="chron_2" reporter:datatype="text"/>
4747                         <field reporter:label="Chron 3" name="chron_3" reporter:datatype="text"/>
4748                         <field reporter:label="Chron 4" name="chron_4" reporter:datatype="text"/>
4749                         <field reporter:label="Chron 5" name="chron_5" reporter:datatype="text"/>
4750                 </fields>
4751                 <links>
4752                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4753                 </links>
4754                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4755                         <actions>
4756                                 <create permission="ADMIN_SERIAL_CAPTION_PATTERN">
4757                                         <context link="subscription" field="owning_lib" />
4758                                 </create>
4759                                 <retrieve />
4760                                 <update permission="ADMIN_SERIAL_CAPTION_PATTERN">
4761                                         <context link="subscription" field="owning_lib" />
4762                                 </update>
4763                                 <delete permission="ADMIN_SERIAL_CAPTION_PATTERN">
4764                                         <context link="subscription" field="owning_lib" />
4765                                 </delete>
4766                         </actions>
4767                 </permacrud>
4768         </class>
4769
4770         <class id="ssub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::subscription" oils_persist:tablename="serial.subscription" reporter:label="Subscription">
4771                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_id_seq">
4772                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4773                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
4774                         <field reporter:label="Start Date" name="start_date" reporter:datatype="timestamp"/>
4775                         <field reporter:label="End Date" name="end_date" reporter:datatype="timestamp"/>
4776                         <field reporter:label="Bibliographic Record Entry" name="record_entry" reporter:datatype="link"/>
4777                         <field reporter:label="Expected Date Offset" name="expected_date_offset" reporter:datatype="interval"/>
4778                         <field reporter:label="Distributions" name="distributions" oils_persist:virtual="true" reporter:datatype="link"/>
4779                         <field reporter:label="Issuances" name="issuances" oils_persist:virtual="true" reporter:datatype="link"/>
4780                         <field reporter:label="Captions and Patterns" name="scaps" oils_persist:virtual="true" reporter:datatype="link"/>
4781                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4782                 </fields>
4783                 <links>
4784                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
4785                         <link field="record_entry" reltype="has_a" key="id" map="" class="bre"/>
4786                         <link field="distributions" reltype="has_many" key="subscription" map="" class="sdist"/>
4787                         <link field="issuances" reltype="has_many" key="subscription" map="" class="siss"/>
4788                         <link field="scaps" reltype="has_many" key="subscription" map="" class="scap"/>
4789                         <link field="notes" reltype="has_many" key="subscription" map="" class="ssubn"/>
4790                 </links>
4791                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4792                         <actions>
4793                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4794                                 <retrieve />
4795                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4796                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION" context_field="owning_lib"/>
4797                         </actions>
4798                 </permacrud>
4799         </class>
4800
4801         <class id="ssubn" controller="open-ils.cstore" oils_obj:fieldmapper="serial::subscription_note" oils_persist:tablename="serial.subscription_note" reporter:label="Subscription Note">
4802                 <fields oils_persist:primary="id" oils_persist:sequence="serial.subscription_note_id_seq">
4803                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4804                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4805                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4806                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4807                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4808                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4809                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4810                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4811                 </fields>
4812                 <links>
4813                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4814                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4815                 </links>
4816         </class>
4817
4818         <class id="sdist" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::distribution" oils_persist:tablename="serial.distribution" reporter:label="Distribution">
4819                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_id_seq">
4820                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4821                         <field reporter:label="Legacy Record Entry" name="record_entry" reporter:datatype="link"/>
4822                         <field reporter:label="Summary Method" name="summary_method" reporter:datatype="text"/>
4823                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4824                         <field reporter:label="Holding Lib" name="holding_lib" reporter:datatype="org_unit"/>
4825                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4826                         <field reporter:label="Receive Call Number" name="receive_call_number" reporter:datatype="link"/>
4827                         <field reporter:label="Receive Unit Template" name="receive_unit_template" reporter:datatype="link"/>
4828                         <field reporter:label="Bind Call Number" name="bind_call_number" reporter:datatype="link"/>
4829                         <field reporter:label="Bind Unit Template" name="bind_unit_template" reporter:datatype="link"/>
4830                         <field reporter:label="Unit Label Prefix" name="unit_label_prefix" reporter:datatype="text"/>
4831                         <field reporter:label="Unit Label Suffix" name="unit_label_suffix" reporter:datatype="text"/>
4832                         <field reporter:label="Display Grouping" name="display_grouping" reporter:datatype="text"/>
4833                         <field reporter:label="Streams" name="streams" oils_persist:virtual="true" reporter:datatype="link"/>
4834                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
4835                         <field reporter:label="Basic Issue Summary" name="basic_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4836                         <field reporter:label="Supplemental Issue Summary" name="supplement_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4837                         <field reporter:label="Index Issue Summary" name="index_summary" oils_persist:virtual="true" reporter:datatype="link"/>
4838                 </fields>
4839                 <links>
4840                         <link field="record_entry" reltype="has_a" key="id" map="" class="sre"/>
4841                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4842                         <link field="holding_lib" reltype="has_a" key="id" map="" class="aou"/>
4843                         <link field="receive_call_number" reltype="has_a" key="id" map="" class="acn"/>
4844                         <link field="receive_unit_template" reltype="has_a" key="id" map="" class="act"/>
4845                         <link field="bind_call_number" reltype="has_a" key="id" map="" class="acn"/>
4846                         <link field="bind_unit_template" reltype="has_a" key="id" map="" class="act"/>
4847                         <link field="streams" reltype="has_many" key="distribution" map="" class="sstr"/>
4848                         <link field="notes" reltype="has_many" key="distribution" map="" class="sdistn"/>
4849                         <link field="basic_summary" reltype="might_have" key="distribution" map="" class="sbsum"/>
4850                         <link field="supplement_summary" reltype="might_have" key="distribution" map="" class="sssum"/>
4851                         <link field="index_summary" reltype="might_have" key="distribution" map="" class="sisum"/>
4852                 </links>
4853                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4854                         <actions>
4855                                 <create permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4856                                 <retrieve />
4857                                 <update permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4858                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION" context_field="holding_lib" />
4859                         </actions>
4860                 </permacrud>
4861         </class>
4862
4863         <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">
4864                 <fields oils_persist:primary="id" oils_persist:sequence="serial.distribution_note_id_seq">
4865                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4866                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4867                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4868                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4869                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
4870                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
4871                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
4872                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
4873                 </fields>
4874                 <links>
4875                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4876                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4877                 </links>
4878                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4879                         <actions>
4880                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
4881                                         <context link="distribution" field="holding_lib" />
4882                                 </create>
4883                                 <retrieve permission="ADMIN_SERIAL_DISTRIBUTION">
4884                                         <context link="distribution" field="holding_lib" />
4885                                 </retrieve>
4886                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
4887                                         <context link="distribution" field="holding_lib" />
4888                                 </update>
4889                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
4890                                         <context link="distribution" field="holding_lib" />
4891                                 </delete>
4892                         </actions>
4893                 </permacrud>
4894         </class>
4895
4896         <class id="sstr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::stream" oils_persist:tablename="serial.stream" reporter:label="Stream">
4897                 <fields oils_persist:primary="id" oils_persist:sequence="serial.stream_id_seq">
4898                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4899                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
4900                         <field reporter:label="Routing Label" name="routing_label" reporter:datatype="text"/>
4901                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4902                         <field reporter:label="Routing List Users" name="routing_list_users" oils_persist:virtual="true" reporter:datatype="link"/>
4903                 </fields>
4904                 <links>
4905                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
4906                         <link field="items" reltype="has_many" key="id" map="" class="sitem"/>
4907                         <link field="routing_list_users" reltype="has_many" key="stream" map="" class="srlu"/>
4908                 </links>
4909                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4910                         <actions>
4911                                 <create permission="ADMIN_SERIAL_STREAM">
4912                                         <context link="distribution" field="holding_lib" />
4913                                 </create>
4914                                 <retrieve />
4915                                 <update permission="ADMIN_SERIAL_STREAM">
4916                                         <context link="distribution" field="holding_lib" />
4917                                 </update>
4918                                 <delete permission="ADMIN_SERIAL_STREAM">
4919                                         <context link="distribution" field="holding_lib" />
4920                                 </delete>
4921                         </actions>
4922                 </permacrud>
4923         </class>
4924
4925         <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">
4926                 <fields oils_persist:primary="id" oils_persist:sequence="serial.routing_list_user_id_seq">
4927                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4928                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
4929                         <field reporter:label="Position" name="pos" reporter:datatype="int"/>
4930                         <field reporter:label="Reader" name="reader" reporter:datatype="link"/>
4931                         <field reporter:label="Department" name="department" reporter:datatype="text"/>
4932                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
4933                 </fields>
4934                 <links>
4935                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
4936                         <link field="reader" reltype="has_a" key="id" map="" class="au"/>
4937                 </links>
4938                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4939                         <actions>
4940                                 <create permission="ADMIN_SERIAL_STREAM">
4941                                         <context link="stream" jump="distribution" field="holding_lib" />
4942                                 </create>
4943                                 <retrieve permission="RECEIVE_SERIAL">
4944                                         <context link="stream" jump="distribution" field="holding_lib" />
4945                                 </retrieve>
4946                                 <update permission="ADMIN_SERIAL_STREAM">
4947                                         <context link="stream" jump="distribution" field="holding_lib" />
4948                                 </update>
4949                                 <delete permission="ADMIN_SERIAL_STREAM">
4950                                         <context link="stream" jump="distribution" field="holding_lib" />
4951                                 </delete>
4952                         </actions>
4953                 </permacrud>
4954         </class>
4955
4956         <class id="siss" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::issuance" oils_persist:tablename="serial.issuance" reporter:label="Issuance">
4957                 <fields oils_persist:primary="id" oils_persist:sequence="serial.issuance_id_seq">
4958                         <field reporter:label="ID" name="id" reporter:datatype="id" />
4959                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
4960                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
4961                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
4962                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
4963                         <field reporter:label="Subscription" name="subscription" reporter:datatype="link"/>
4964                         <field reporter:label="Caption/Pattern" name="caption_and_pattern" reporter:datatype="link"/>
4965                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
4966                         <field reporter:label="Date Published" name="date_published" reporter:datatype="timestamp"/>
4967                         <field reporter:label="Holding Code" name="holding_code" reporter:datatype="text"/>
4968                         <field reporter:label="Holding Type" name="holding_type" reporter:datatype="text"/>
4969                         <field reporter:label="Holding Link ID" name="holding_link_id" reporter:datatype="int"/>
4970                         <field reporter:label="Items" name="items" oils_persist:virtual="true" reporter:datatype="link" />
4971                 </fields>
4972                 <links>
4973                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
4974                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
4975                         <link field="subscription" reltype="has_a" key="id" map="" class="ssub"/>
4976                         <link field="caption_and_pattern" reltype="has_a" key="id" map="" class="scap"/>
4977                         <link field="items" reltype="has_many" key="issuance" map="" class="sitem"/>
4978                 </links>
4979                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
4980                         <actions>
4981                                 <create permission="ADMIN_SERIAL_SUBSCRIPTION">
4982                                         <context link="subscription" field="owning_lib" />
4983                                 </create>
4984                                 <retrieve/>
4985                                 <update permission="ADMIN_SERIAL_SUBSCRIPTION">
4986                                         <context link="subscription" field="owning_lib" />
4987                                 </update>
4988                                 <delete permission="ADMIN_SERIAL_SUBSCRIPTION">
4989                                         <context link="subscription" field="owning_lib" />
4990                                 </delete>
4991                         </actions>
4992                 </permacrud>
4993         </class>
4994
4995         <class id="sunit" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::unit" oils_persist:tablename="serial.unit" reporter:label="Unit">
4996                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
4997                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
4998                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
4999                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
5000                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
5001                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
5002                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
5003                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
5004                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
5005                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
5006                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
5007                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
5008                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
5009                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
5010                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
5011                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
5012                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
5013                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
5014                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
5015                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
5016                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
5017                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
5018                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
5019                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
5020                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
5021                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
5022                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
5023                         <field reporter:label="Price" name="price" reporter:datatype="money" />
5024                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
5025                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
5026                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
5027                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
5028                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
5029                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
5030                         <field reporter:label="Sort Key" name="sort_key" reporter:datatype="text"/>
5031                         <field reporter:label="Summary Contents" name="summary_contents" reporter:datatype="text"/>
5032                         <field reporter:label="Detailed Contents" name="detailed_contents" reporter:datatype="text"/>
5033                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5034                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
5035                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5036                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
5037                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
5038                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
5039                 </fields>
5040                 <links>
5041                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
5042                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
5043                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
5044                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5045                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5046                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
5047                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5048                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
5049                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
5050                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
5051                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
5052                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
5053                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
5054                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
5055                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
5056                 </links>
5057                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5058                         <actions>
5059                                 <create permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5060                                 <retrieve/>
5061                                 <update permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5062                                 <delete permission="RECEIVE_SERIAL ADMIN_SERIAL_SUBSCRIPTION" context_field="circ_lib" />
5063                         </actions>
5064                 </permacrud>
5065         </class>
5066
5067         <class id="sitem" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="serial::item" oils_persist:tablename="serial.item" reporter:label="Item">
5068                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_id_seq">
5069                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5070                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5071                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
5072                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5073                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
5074                         <field reporter:label="Issuance" name="issuance" reporter:datatype="link"/>
5075                         <field reporter:label="Stream" name="stream" reporter:datatype="link"/>
5076                         <field reporter:label="Unit" name="unit" reporter:datatype="link"/>
5077                         <field reporter:label="URI" name="uri" reporter:datatype="link"/>
5078                         <field reporter:label="Date Expected" name="date_expected" reporter:datatype="timestamp"/>
5079                         <field reporter:label="Date Received" name="date_received" reporter:datatype="timestamp"/>
5080                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
5081                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
5082                         <field reporter:label="Shadowed?" name="shadowed" reporter:datatype="bool"/>
5083                 </fields>
5084                 <links>
5085                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5086                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
5087                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5088                         <link field="stream" reltype="has_a" key="id" map="" class="sstr"/>
5089                         <link field="unit" reltype="has_a" key="id" map="" class="sunit"/>
5090                         <link field="uri" reltype="has_a" key="id" map="" class="auri"/>
5091                         <link field="notes" reltype="has_many" key="item" map="" class="sin"/>
5092                 </links>
5093                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5094                         <actions>
5095                                 <create permission="ADMIN_SERIAL_ITEM">
5096                                         <context link="stream" jump="distribution" field="holding_lib" />
5097                                 </create>
5098                                 <retrieve permission="ADMIN_SERIAL_ITEM">
5099                                         <context link="stream" jump="distribution" field="holding_lib" />
5100                                 </retrieve>
5101                                 <update permission="ADMIN_SERIAL_ITEM">
5102                                         <context link="stream" jump="distribution" field="holding_lib" />
5103                                 </update>
5104                                 <delete permission="ADMIN_SERIAL_ITEM">
5105                                         <context link="stream" jump="distribution" field="holding_lib" />
5106                                 </delete>
5107                         </actions>
5108                 </permacrud>
5109         </class>
5110
5111         <class id="sin" controller="open-ils.cstore" oils_obj:fieldmapper="serial::item_note" oils_persist:tablename="serial.item_note" reporter:label="Item Note">
5112                 <fields oils_persist:primary="id" oils_persist:sequence="serial.item_note_id_seq">
5113                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5114                         <field reporter:label="Item" name="item" reporter:datatype="link"/>
5115                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
5116                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
5117                         <field reporter:label="Public?" name="pub" reporter:datatype="bool"/>
5118                         <field reporter:label="Alert?" name="alert" reporter:datatype="bool"/>
5119                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5120                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
5121                 </fields>
5122                 <links>
5123                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
5124                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
5125                 </links>
5126                 <!-- Not available via PCRUD at this time -->
5127         </class>
5128         <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">
5129                 <fields>
5130                         <field name="summary_type" reporter:label="Summary Type" reporter:datatype="text" />
5131                         <field name="id" reporter:label="Native ID" reporter:datatype="int" /><!-- not datatype="id", because id is not unique in this view -->
5132                         <field name="distribution" reporter:label="Distribution" reporter:datatype="link" />
5133                         <field name="generated_coverage" reporter:label="Generated Coverage" reporter:datatype="text" />
5134                         <field name="show_generated" reporter:label="Show Generated?" reporter:datatype="bool" />
5135                 </fields>
5136                 <links>
5137                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5138                 </links>
5139         </class>
5140         <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">
5141                 <fields oils_persist:primary="id" oils_persist:sequence="serial.materialized_holding_code_id_seq">
5142                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5143                         <field name="issuance" reporter:label="Issuance" reporter:datatype="link" />
5144                         <field name="holding_type" reporter:label="Holding Type" reporter:datatype="text" />
5145                         <field name="ind1" reporter:label="First Indicator" reporter:datatype="text" />
5146                         <field name="ind2" reporter:label="Second Indicator" reporter:datatype="text" />
5147                         <field name="subfield" reporter:label="Subfield" reporter:datatype="text" />
5148                         <field name="value" reporter:label="Value" reporter:datatype="text" oils_obj:validate="^\w$" />
5149                 </fields>
5150                 <links>
5151                         <link field="issuance" reltype="has_a" key="id" map="" class="siss"/>
5152                 </links>
5153         </class>
5154         <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">
5155                 <fields oils_persist:primary="id" oils_persist:sequence="serial.basic_summary_id_seq">
5156                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5157                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5158                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5159                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5160                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5161                 </fields>
5162                 <links>
5163                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5164                 </links>
5165                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5166                         <actions>
5167                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5168                                         <context link="distribution" field="holding_lib" />
5169                                 </create>
5170                                 <retrieve/>
5171                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5172                                         <context link="distribution" field="holding_lib" />
5173                                 </update>
5174                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5175                                         <context link="distribution" field="holding_lib" />
5176                                 </delete>
5177                         </actions>
5178                 </permacrud>
5179         </class>
5180
5181         <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">
5182                 <fields oils_persist:primary="id" oils_persist:sequence="serial.supplement_summary_id_seq">
5183                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5184                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5185                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5186                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5187                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5188                 </fields>
5189                 <links>
5190                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5191                 </links>
5192                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5193                         <actions>
5194                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5195                                         <context link="distribution" field="holding_lib" />
5196                                 </create>
5197                                 <retrieve/>
5198                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5199                                         <context link="distribution" field="holding_lib" />
5200                                 </update>
5201                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5202                                         <context link="distribution" field="holding_lib" />
5203                                 </delete>
5204                         </actions>
5205                 </permacrud>
5206         </class>
5207
5208         <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">
5209                 <fields oils_persist:primary="id" oils_persist:sequence="serial.index_summary_id_seq">
5210                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5211                         <field reporter:label="Distribution" name="distribution" reporter:datatype="link"/>
5212                         <field reporter:label="Generated Coverage" name="generated_coverage" reporter:datatype="text"/>
5213                         <field reporter:label="Textual Holdings" name="textual_holdings" reporter:datatype="text"/>
5214                         <field reporter:label="Show Generated?" name="show_generated" reporter:datatype="bool"/>
5215                 </fields>
5216                 <links>
5217                         <link field="distribution" reltype="has_a" key="id" map="" class="sdist"/>
5218                 </links>
5219                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5220                         <actions>
5221                                 <create permission="ADMIN_SERIAL_DISTRIBUTION">
5222                                         <context link="distribution" field="holding_lib" />
5223                                 </create>
5224                                 <retrieve/>
5225                                 <update permission="ADMIN_SERIAL_DISTRIBUTION">
5226                                         <context link="distribution" field="holding_lib" />
5227                                 </update>
5228                                 <delete permission="ADMIN_SERIAL_DISTRIBUTION">
5229                                         <context link="distribution" field="holding_lib" />
5230                                 </delete>
5231                         </actions>
5232                 </permacrud>
5233         </class>
5234
5235         <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">
5236                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_copy_map_id_seq">
5237                         <field name="id" reporter:datatype="id" />
5238                         <field name="owning_copy" reporter:datatype="link"/>
5239                         <field name="stat_cat" reporter:datatype="link"/>
5240                         <field name="stat_cat_entry" reporter:datatype="link"/>
5241                 </fields>
5242                 <links>
5243                         <link field="owning_copy" reltype="has_a" key="id" map="" class="acp"/>
5244                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="asce"/>
5245                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
5246                 </links>
5247         </class>
5248         <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">
5249                 <fields oils_persist:primary="code">
5250                         <field reporter:label="Item Type Code" name="code" reporter:selector="value" reporter:datatype="text"/>
5251                         <field reporter:label="Item Type" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5252                 </fields>
5253                 <links/>
5254         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5255             <actions>
5256                 <create permission="ADMIN_MARC_CODE" global_required="true"/>
5257                 <retrieve/>
5258                 <update permission="ADMIN_MARC_CODE" global_required="true"/>
5259                 <delete permission="ADMIN_MARC_CODE" global_required="true"/>
5260             </actions>
5261         </permacrud>
5262         </class>
5263         <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">
5264                 <fields oils_persist:primary="code">
5265                         <field reporter:label="Bib Level Code" name="code"  reporter:datatype="text"/>
5266                         <field reporter:label="Bib Level" name="value"  reporter:datatype="text" oils_persist:i18n="true"/>
5267                 </fields>
5268                 <links/>
5269         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5270             <actions>
5271                 <create permission="CREATE_MARC_CODE" global_required="true"/>
5272                 <retrieve/>
5273                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
5274                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
5275             </actions>
5276         </permacrud>
5277         </class>
5278         <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">
5279                 <fields oils_persist:primary="id" oils_persist:sequence="search.relevance_adjustment_id_seq">
5280                         <field reporter:label="ID" name="id"  reporter:datatype="id"/>
5281                         <field reporter:label="Active" name="active"  reporter:datatype="bool"/>
5282                         <field reporter:label="Index Field" name="field"  reporter:datatype="link"/>
5283                         <field reporter:label="Bump Type" name="bump_type"  reporter:datatype="text"/>
5284                         <field reporter:label="Multiplier" name="multiplier"  reporter:datatype="number"/>
5285                 </fields>
5286                 <links>
5287             <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
5288         </links>
5289         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5290             <actions>
5291                 <create permission="CREATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5292                 <retrieve permission="CREATE_RELEVANCE_ADJUSTMENT UPDATE_RELEVANCE_ADJUSTMENT DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5293                 <update permission="UPDATE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5294                 <delete permission="DELETE_RELEVANCE_ADJUSTMENT" global_required="true"/>
5295             </actions>
5296         </permacrud>
5297         </class>
5298         <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">
5299                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_id_seq">
5300                         <field name="id" reporter:datatype="id" />
5301                         <field name="name" reporter:datatype="text"/>
5302                 </fields>
5303                 <links/>
5304         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5305             <actions>
5306                 <create permission="CREATE_LASSO" global_required="true"/>
5307                 <retrieve permission="CREATE_LASSO UPDATE_LASSO DELETE_LASSO" global_required="true"/>
5308                 <update permission="UPDATE_LASSO" global_required="true"/>
5309                 <delete permission="DELETE_LASSO" global_required="true"/>
5310             </actions>
5311         </permacrud>
5312         </class>
5313         <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">
5314                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_lasso_map_id_seq">
5315                         <field name="id" reporter:datatype="id" />
5316                         <field name="lasso" reporter:datatype="link"/>
5317                         <field name="org_unit" reporter:datatype="org_unit"/>
5318                 </fields>
5319                 <links>
5320                         <link field="lasso" reltype="has_a" key="id" map="" class="lasso"/>
5321                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5322                 </links>
5323         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5324             <actions>
5325                 <create permission="CREATE_LASSO_MAP" global_required="true"/>
5326                 <retrieve permission="CREATE_LASSO_MAP UPDATE_LASSO_MAP DELETE_LASSO_MAP" global_required="true"/>
5327                 <update permission="UPDATE_LASSO_MAP" global_required="true"/>
5328                 <delete permission="DELETE_LASSO_MAP" global_required="true"/>
5329             </actions>
5330         </permacrud>
5331         </class>
5332         <class id="aoupa" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::org_unit_proximity_adjustment" oils_persist:tablename="actor.org_unit_proximity_adjustment" reporter:label="Org Unit Proximity Adjustment">
5333                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_adjustment_id_seq">
5334                         <field name="id" reporter:label="ID" reporter:datatype="id" />
5335                         <field name="item_circ_lib" reporter:label="Item Circ Lib" reporter:datatype="org_unit"/>
5336                         <field name="item_owning_lib" reporter:label="Item Owning Lib" reporter:datatype="org_unit"/>
5337                         <field name="hold_pickup_lib" reporter:label="Hold Pickup Lib" reporter:datatype="org_unit"/>
5338                         <field name="hold_request_lib" reporter:label="Hold Request Lib" reporter:datatype="org_unit"/>
5339                         <field name="copy_location" reporter:label="Copy Location" reporter:datatype="link"/>
5340                         <field name="circ_mod" reporter:label="Circ Modifier" reporter:datatype="link"/>
5341                         <field name="pos" reporter:label="Position" reporter:datatype="int" />
5342                         <field name="absolute_adjustment" reporter:label="Absolute adjustment?" reporter:datatype="bool" />
5343                         <field name="prox_adjustment" reporter:label="Proximity Adjustment" reporter:datatype="number" />
5344                 </fields>
5345                 <links>
5346                         <link field="item_circ_lib" reltype="has_a" key="id" map="" class="aou"/>
5347                         <link field="item_owning_lib" reltype="has_a" key="id" map="" class="aou"/>
5348                         <link field="hold_pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5349                         <link field="hold_request_lib" reltype="has_a" key="id" map="" class="aou"/>
5350                         <link field="circ_mod" reltype="has_a" key="code" map="" class="ccm"/>
5351                         <link field="copy_location" reltype="has_a" key="id" map="" class="acpl"/>
5352                 </links>
5353         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5354             <actions>
5355                 <create permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5356                 <retrieve permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5357                 <update permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5358                 <delete permission="ADMIN_PROXIMITY_ADJUSTMENT" global_required="true"/>
5359             </actions>
5360         </permacrud>
5361         </class>
5362         <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">
5363                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5364                         <field name="id" reporter:datatype="id" />
5365                         <field name="from_org" reporter:datatype="org_unit"/>
5366                         <field name="to_org" reporter:datatype="org_unit"/>
5367                         <field name="prox" reporter:datatype="int" />
5368                 </fields>
5369                 <links>
5370                         <link field="from_org" reltype="has_a" key="id" map="" class="aou"/>
5371                         <link field="to_org" reltype="has_a" key="id" map="" class="aou"/>
5372                 </links>
5373         </class>
5374         <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">
5375                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_proximity_id_seq">
5376                         <field reporter:label="ID" name="id" reporter:datatype="id" />
5377                         <field reporter:label="Relevance" name="rel" reporter:datatype="float"/>
5378                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
5379                         <field reporter:label="Total Results" name="total" reporter:datatype="int" />
5380                         <field reporter:label="Checked" name="checked" reporter:datatype="int"/>
5381                         <field reporter:label="Visible" name="visible" reporter:datatype="int"/>
5382                         <field reporter:label="Deleted" name="deleted" reporter:datatype="int"/>
5383                         <field reporter:label="Excluded" name="excluded" reporter:datatype="int"/>
5384                 </fields>
5385                 <links/>
5386         </class>
5387         <class id="asv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::survey" oils_persist:tablename="action.survey" reporter:label="Survey">
5388                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_id_seq">
5389                         <field reporter:label="Questions" name="questions" oils_persist:virtual="true" reporter:datatype="link"/>
5390                         <field reporter:label="Responses" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
5391                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
5392                         <field reporter:label="Survey End Date/Time" name="end_date" reporter:datatype="timestamp"/>
5393                         <field reporter:label="Survey ID" name="id" reporter:datatype="id"/>
5394                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
5395                         <field reporter:label="OPAC Survey?" name="opac" reporter:datatype="bool"/>
5396                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
5397                         <field reporter:label="Poll Style?" name="poll" reporter:datatype="bool"/>
5398                         <field reporter:label="Is Required?" name="required" reporter:datatype="bool"/>
5399                         <field reporter:label="Survey Start Date/Time" name="start_date" reporter:datatype="timestamp"/>
5400                         <field reporter:label="Display in User Summary" name="usr_summary" reporter:datatype="bool"/>
5401                 </fields>
5402                 <links>
5403                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5404                         <link field="responses" reltype="has_many" key="survey" map="" class="asvr"/>
5405                         <link field="questions" reltype="has_many" key="survey" map="" class="asvq"/>
5406                 </links>
5407         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5408             <actions>
5409                 <create permission="ADMIN_SURVEY" context_field="owner"/>
5410                 <retrieve/>
5411                 <update permission="ADMIN_SURVEY" context_field="owner"/>
5412                 <delete permission="ADMIN_SURVEY" context_field="owner"/>
5413             </actions>
5414         </permacrud>
5415         </class>
5416         <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">
5417                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_address_id_seq">
5418                         <field name="address_type"  reporter:datatype="text"/>
5419                         <field name="city"  reporter:datatype="text"/>
5420                         <field name="country"  reporter:datatype="text"/>
5421                         <field name="county"  reporter:datatype="text"/>
5422                         <field name="id" reporter:datatype="id" />
5423                         <field name="org_unit" reporter:datatype="org_unit"/>
5424                         <field name="post_code"  reporter:datatype="text"/>
5425                         <field name="state"  reporter:datatype="text"/>
5426                         <field name="street1"  reporter:datatype="text"/>
5427                         <field name="street2"  reporter:datatype="text"/>
5428                         <field name="valid" reporter:datatype="bool"/>
5429                         <field name="san" reporter:datatype="text" reporter:label="SAN"/>
5430                 </fields>
5431                 <links>
5432                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
5433                 </links>
5434         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5435             <actions>
5436                 <create permission="CREATE_ORG_ADDRESS" context_field="org_unit"/>
5437                 <retrieve/>
5438                 <update permission="UPDATE_ORG_ADDRESS" context_field="org_unit"/>
5439                 <delete permission="DELETE_ORG_ADDRESS" context_field="org_unit"/>
5440             </actions>
5441         </permacrud>
5442         </class>
5443         <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">
5444                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_query_id_seq">
5445                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5446                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5447                         <field name="query_text" reporter:datatype="text"/>
5448                 </fields>
5449         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5450             <actions>
5451                 <retrieve/>
5452             </actions>
5453         </permacrud>
5454         </class>
5455
5456         <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">
5457                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_id_seq">
5458                         <field name="id" reporter:datatype="id" reporter:selector="label"/>
5459                         <field name="owner" reporter:datatype="org_unit"/>
5460                         <field name="code" reporter:datatype="text"/>
5461                         <field name="label" reporter:datatype="text" oils_persist:i18n="true"/>
5462                         <field name="create_date" reporter:datatype="timestamp"/>
5463                         <field name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
5464                 </fields>
5465                 <links>
5466                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
5467                         <link field="entries" reltype="has_many" key="grp" map="" class="asfge"/>
5468                 </links>
5469         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5470             <actions>
5471                 <create permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5472                 <retrieve/>
5473                 <update permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5474                 <delete permission="ADMIN_SEARCH_FILTER_GROUP" context_field="owner"/>
5475             </actions>
5476         </permacrud>
5477         </class>
5478         <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">
5479                 <fields oils_persist:primary="id" oils_persist:sequence="actor.search_filter_group_entry_id_seq">
5480                         <field name="id" reporter:datatype="id"/>
5481                         <field name="grp" reporter:datatype="link"/>
5482                         <field name="pos" reporter:datatype="int"/>
5483                         <field name="query" reporter:datatype="link"/>
5484                 </fields>
5485                 <links>
5486                         <link field="grp" reltype="has_a" key="id" map="" class="asfg"/>
5487                         <link field="query" reltype="has_a" key="id" map="" class="asq"/>
5488                 </links>
5489         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5490             <actions>
5491                 <create permission="ADMIN_SEARCH_FILTER_GROUP">
5492                     <context link="grp" field="owner"/>
5493                 </create>
5494                 <retrieve/>
5495                 <update permission="ADMIN_SEARCH_FILTER_GROUP">
5496                     <context link="grp" field="owner"/>
5497                 </update>
5498                 <delete permission="ADMIN_SEARCH_FILTER_GROUP">
5499                     <context link="grp" field="owner"/>
5500                 </delete>
5501             </actions>
5502         </permacrud>
5503         </class>
5504
5505         <!-- A note: Please update alhr and ahopl when updating ahr -->
5506         <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">
5507                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5508                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5509                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5510                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5511                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5512                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5513                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5514                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5515                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5516                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5517                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5518                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5519                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5520                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5521                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5522                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5523                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5524                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5525                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5526                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5527                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5528                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5529                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5530                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5531                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5532                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5533                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5534                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5535                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5536                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5537                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5538                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5539                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5540                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5541                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5542                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5543                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5544                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5545                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5546                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5547                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5548                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5549                 </fields>
5550                 <links>
5551                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5552                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5553                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5554                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5555                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5556                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5557                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5558                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5559                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5560                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5561                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5562                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5563                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5564                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5565                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5566                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5567                 </links>
5568                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5569                         <actions>
5570                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5571                         </actions>
5572                 </permacrud>
5573         </class>
5574         <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">
5575                 <oils_persist:source_definition><![CDATA[
5576                 SELECT
5577                         ahr.*,
5578                         COALESCE(acplo.position, acpl_ordered.fallback_position) AS
5579                                 copy_location_order_position,
5580                         CASE WHEN au.alias IS NOT NULL THEN
5581                                 au.alias
5582                         ELSE
5583                                 au.first_given_name
5584                         END AS usr_alias_or_first_given_name,
5585                         au.first_given_name AS usr_first_given_name,
5586                         au.second_given_name AS usr_second_given_name,
5587                         au.family_name AS usr_family_name,
5588                         au.prefix AS usr_prefix,
5589                         au.suffix AS usr_suffix,
5590                         au.alias AS usr_alias,
5591                         CASE WHEN au.alias IS NOT NULL THEN
5592                                 au.alias
5593                         ELSE
5594                                 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5595                                         COALESCE(au.family_name, ''),
5596                                         COALESCE(au.suffix, ''),
5597                                         ', ',
5598                                         COALESCE(au.prefix, ''),
5599                                         COALESCE(au.first_given_name, ''),
5600                                         COALESCE(au.second_given_name, '')
5601                                 ], ' '), E'\\s+,', ',')
5602                         END AS usr_alias_or_display_name,
5603                         REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[
5604                                 COALESCE(au.family_name, ''),
5605                                 COALESCE(au.suffix, ''),
5606                                 ', ',
5607                                 COALESCE(au.prefix, ''),
5608                                 COALESCE(au.first_given_name, ''),
5609                                 COALESCE(au.second_given_name, '')
5610                         ], ' '), E'\\s+,', ',') AS usr_display_name,
5611                         TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label)
5612                                 AS call_number_label,
5613                         siss.label AS issuance_label,
5614                         (ahr.usr <> ahr.requestor) AS is_staff_hold,
5615                         ahcm_1.copy_count AS potential_copies
5616                 FROM action.hold_request ahr
5617                 JOIN asset.copy acp ON (acp.id = ahr.current_copy)
5618                 JOIN asset.call_number acn ON (acp.call_number = acn.id)
5619                 JOIN asset.call_number_prefix acnp ON (acn.prefix = acnp.id)
5620                 JOIN asset.call_number_suffix acns ON (acn.suffix = acns.id)
5621                 JOIN actor.usr au ON (au.id = ahr.usr)
5622                 JOIN (
5623                         SELECT *, (ROW_NUMBER() OVER (ORDER BY name) + 1000000) AS fallback_position
5624                         FROM asset.copy_location
5625                 ) acpl_ordered ON (acpl_ordered.id = acp.location)
5626                 LEFT JOIN actor.usr_standing_penalty ausp 
5627                         ON (ahr.usr = ausp.usr AND (ausp.stop_date IS NULL OR ausp.stop_date > NOW()))
5628                 LEFT JOIN config.standing_penalty csp
5629                         ON (
5630                                 csp.id = ausp.standing_penalty AND 
5631                                 csp.block_list LIKE '%CAPTURE%' AND (
5632                                         (csp.org_depth IS NULL AND ahr.pickup_lib = ausp.org_unit) OR
5633                                         (csp.org_depth IS NOT NULL AND ahr.pickup_lib IN (
5634                                                 SELECT id FROM actor.org_unit_descendants(ausp.org_unit, csp.org_depth))
5635                                         )
5636                                 )
5637                         )
5638                 JOIN (
5639                         SELECT COUNT(target_copy) AS copy_count, hold
5640                         FROM action.hold_copy_map
5641                         GROUP BY 2
5642                 ) ahcm_1 ON (ahcm_1.hold = ahr.id)
5643                 LEFT JOIN serial.issuance siss
5644                         ON (ahr.hold_type = 'I' AND siss.id = ahr.target)
5645                 LEFT JOIN asset.copy_location_order acplo
5646                         ON (acp.location = acplo.location AND
5647                                 acp.circ_lib = acplo.org)
5648                 WHERE
5649                         ahr.capture_time IS NULL AND
5650                         ahr.cancel_time IS NULL AND
5651                         csp.id IS NULL AND
5652                         (ahr.expire_time is NULL OR ahr.expire_time > NOW()) AND
5653                         acp.status IN (0,7)
5654                 ]]></oils_persist:source_definition>
5655                 <fields oils_persist:primary="id">
5656                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5657                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5658                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5659                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5660                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5661                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5662                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5663                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5664                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5665                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5666                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5667                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5668                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5669                         <field reporter:label="Notifications SMS Number" name="sms_notify" reporter:datatype="text"/>
5670                         <field reporter:label="Notifications SMS Carrier" name="sms_carrier" reporter:datatype="link"/>
5671                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5672                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5673                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5674                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5675                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5676                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5677                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5678                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5679                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5680                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5681                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5682                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5683                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5684                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5685                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5686                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5687                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5688                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5689                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5690                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5691                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5692                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5693                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5694                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5695                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5696                         <field reporter:label="Copy Location Sort Order" name="copy_location_order_position" reporter:datatype="int" />
5697                         <field reporter:label="User First Given Name" name="usr_first_given_name" reporter:datatype="text" />
5698                         <field reporter:label="User Second Given Name" name="usr_second_given_name" reporter:datatype="text" />
5699                         <field reporter:label="User Family Name" name="usr_family_name" reporter:datatype="text" />
5700                         <field reporter:label="User Prefix" name="usr_prefix" reporter:datatype="text" />
5701                         <field reporter:label="User Suffix" name="usr_suffix" reporter:datatype="text" />
5702                         <field reporter:label="User Alias or First Given Name" name="usr_alias_or_first_given_name" reporter:datatype="text" />
5703                         <field reporter:label="User Display Name" name="usr_display_name" reporter:datatype="text" />
5704                         <field reporter:label="User Alias or Display Name" name="usr_alias_or_display_name" reporter:datatype="text" />
5705                         <field reporter:label="User Alias" name="usr_alias" reporter:datatype="text" />
5706                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text" />
5707                         <field reporter:label="Issuance Label" name="issuance_label" reporter:datatype="text" />
5708                         <field reporter:label="Is Staff Hold?" name="is_staff_hold" reporter:datatype="bool" />
5709                         <field reporter:label="Potential Copies" name="potential_copies" reporter:datatype="int" />
5710                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5711                 </fields>
5712                 <links>
5713                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5714                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5715                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5716                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5717                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5718                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5720                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5721                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5722                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5723                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5724                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5725                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5726                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5727                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5728                         <link field="sms_carrier" reltype="has_a" key="id" map="" class="csc"/>
5729                 </links>
5730                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5731                         <actions>
5732                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5733                         </actions>
5734                 </permacrud>
5735         </class>
5736         <class id="alhr" controller="open-ils.cstore" oils_obj:fieldmapper="action::last_hold_request" reporter:label="Last Captured Hold Request" oils_persist:readonly="true">
5737                 <oils_persist:source_definition>
5738                         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)
5739                 </oils_persist:source_definition>
5740                 <fields oils_persist:primary="id">
5741                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5742                         <field reporter:label="Transit" name="transit" oils_persist:virtual="true" />
5743                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5744                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5745                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5746                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5747                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5748                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5749                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5750                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5751                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5752                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5753                         <field reporter:label="Notifications Phone Number" name="phone_notify" reporter:datatype="text"/>
5754                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5755                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5756                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5757                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5758                         <field reporter:label="Requesting User" name="requestor" reporter:datatype="link"/>
5759                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5760                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5761                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5762                         <field reporter:label="Hold User" name="usr" reporter:datatype="link"/>
5763                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5764                         <field reporter:label="Notify Time" name="notify_time" oils_persist:virtual="true" reporter:datatype="timestamp"/>
5765                         <field reporter:label="Notify Count" name="notify_count" oils_persist:virtual="true" reporter:datatype="int" />
5766                         <field reporter:label="Notifications" name="notifications" oils_persist:virtual="true" reporter:datatype="link"/>
5767                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5768                         <field reporter:label="Eligible Copies" name="eligible_copies" oils_persist:virtual="true" reporter:datatype="link"/>
5769                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5770                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5771                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5772                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5773                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5774                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5775                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5776                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5777                         <field reporter:label="Notes" name="notes" reporter:datatype="link" oils_persist:virtual="true"/>
5778                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5779                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5780                 </fields>
5781                 <links>
5782                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5783                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5784                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5785                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5786                         <link field="requestor" reltype="has_a" key="id" map="" class="au"/>
5787                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5788                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
5789                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5790                         <link field="transit" reltype="might_have" key="hold" map="" class="ahtc"/>
5791                         <link field="notifications" reltype="has_many" key="hold" map="" class="ahn"/>
5792                         <link field="eligible_copies" reltype="has_many" key="hold" map="target_copy" class="ahcm"/>
5793                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5794                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5795                         <link field="notes" reltype="has_many" key="hold" map="" class="ahrn"/>
5796                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5797                 </links>
5798         </class>
5799
5800         <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">
5801                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_note_id_seq">
5802                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
5803                         <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
5804                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
5805                         <field reporter:label="Body" name="body" reporter:datatype="text"/>
5806                         <field reporter:label="Slip?" name="slip" reporter:datatype="bool"/>
5807                         <field reporter:label="Pub?" name="pub" reporter:datatype="bool"/>
5808                         <field reporter:label="Staff?" name="staff" reporter:datatype="bool"/>
5809                 </fields>
5810                 <links>
5811                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
5812                 </links>
5813                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5814                         <actions>
5815                                 <create permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></create>
5816                                 <retrieve permission="VIEW_USER"><context link="hold" field="request_lib"/></retrieve>
5817                                 <update permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></update>
5818                                 <delete permission="UPDATE_HOLD"><context link="hold" field="request_lib"/></delete>
5819                         </actions>
5820                 </permacrud>
5821         </class>
5822         <class id="combahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::all_hold_request" oils_persist:tablename="action.all_hold_request" reporter:core="true" reporter:label="Combined (Active &amp; Aged) Hold Request">
5823                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5824                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5825                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5826                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5827                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5828                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5829                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5830                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5831                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5832                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5833                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5834                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5835                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5836                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5837                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5838                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5839                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5840                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5841                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5842                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5843                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5844                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5845                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5846                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5847                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5848                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5849                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5850                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5851                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5852                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5853                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5854                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5855                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5856                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5857                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5858                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5859                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5860                         <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
5861                 </fields>
5862                 <links>
5863                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5864                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5865                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5866                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5867                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5868                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5869                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5870                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5871                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5872                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5873                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5874                 </links>
5875                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5876                         <actions>
5877                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5878                         </actions>
5879                 </permacrud>
5880         </class>
5881         <class id="aahr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::aged_hold_request" oils_persist:tablename="action.aged_hold_request" reporter:core="true" reporter:label="Aged Hold Request">
5882                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_id_seq">
5883                         <field reporter:label="Status" name="status" oils_persist:virtual="true" />
5884                         <field reporter:label="Capture Date/Time" name="capture_time" reporter:datatype="timestamp"/>
5885                         <field reporter:label="Currently Targeted Copy" name="current_copy" />
5886                         <field reporter:label="Notify by Email?" name="email_notify" reporter:datatype="bool"/>
5887                         <field reporter:label="Hold Expire Date/Time" name="expire_time" reporter:datatype="timestamp"/>
5888                         <field reporter:label="Fulfilling Library" name="fulfillment_lib" reporter:datatype="org_unit"/>
5889                         <field reporter:label="Fulfilling Staff" name="fulfillment_staff" />
5890                         <field reporter:label="Fulfillment Date/Time" name="fulfillment_time" reporter:datatype="timestamp"/>
5891                         <field reporter:label="Hold Type" name="hold_type" reporter:datatype="text"/>
5892                         <field reporter:label="Holdable Formats (for M-type hold)" name="holdable_formats" reporter:datatype="text"/>
5893                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
5894                         <field reporter:label="Notify by Phone?" name="phone_notify" reporter:datatype="bool"/>
5895                         <field reporter:label="Notify by SMS?" name="sms_notify" reporter:datatype="bool"/>
5896                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
5897                         <field reporter:label="Last Targeting Date/Time" name="prev_check_time" reporter:datatype="timestamp"/>
5898                         <field reporter:label="Requesting Library" name="request_lib" reporter:datatype="org_unit"/>
5899                         <field reporter:label="Request Date/Time" name="request_time" reporter:datatype="timestamp"/>
5900                         <field reporter:label="Patron ZIP" name="usr_post_code" reporter:datatype="text"/>
5901                         <field reporter:label="Patron Home Library" name="usr_home_ou" reporter:datatype="link"/>
5902                         <field reporter:label="Patron Profile Group" name="usr_profile" reporter:datatype="link"/>
5903                         <field reporter:label="Patron Birth Year" name="usr_birth_year" reporter:datatype="int"/>
5904                         <field reporter:label="Staff Placed?" name="staff_placed" reporter:datatype="bool"/>
5905                         <field reporter:label="Item Selection Depth" name="selection_depth" />
5906                         <field reporter:label="Selection Locus" name="selection_ou" reporter:datatype="org_unit"/>
5907                         <field reporter:label="Target Object ID" name="target" reporter:datatype="link"/>
5908                         <field reporter:label="Hold Cancel Date/Time" name="cancel_time" reporter:datatype="timestamp"/>
5909                         <field reporter:label="Bib Record link" name="bib_rec" oils_persist:virtual="true" reporter:datatype="link"/>
5910                         <field reporter:label="Currently Frozen" name="frozen" reporter:datatype="bool"/>
5911                         <field reporter:label="Activation Date" name="thaw_date" reporter:datatype="timestamp"/>
5912                         <field reporter:label="Shelf Time" name="shelf_time" reporter:datatype="timestamp"/>
5913                         <field reporter:label="Cancelation cause" name="cancel_cause" reporter:datatype="link" />
5914                         <field reporter:label="Cancelation note" name="cancel_note" reporter:datatype="text" />
5915                         <field reporter:label="Top of Queue" name="cut_in_line" reporter:datatype="bool" />
5916                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
5917                         <field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
5918                         <field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
5919                 </fields>
5920                 <links>
5921                         <link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
5922                         <link field="fulfillment_staff" reltype="has_a" key="id" map="" class="au"/>
5923                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
5924                         <link field="selection_ou" reltype="has_a" key="id" map="" class="aou"/>
5925                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
5926                         <link field="request_lib" reltype="has_a" key="id" map="" class="aou"/>
5927                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
5928                         <link field="bib_rec" reltype="might_have" key="id" map="" class="rhrr"/>
5929                         <link field="cancel_cause" reltype="might_have" key="id" map="" class="ahrcc"/>
5930                         <link field="current_shelf_lib" reltype="has_a" key="id" map="" class="aou"/>
5931                         <link field="usr_profile" reltype="has_a" key="id" map="" class="pgt"/>
5932                 </links>
5933                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
5934                         <actions>
5935                                 <retrieve permission="VIEW_HOLD" context_field="pickup_lib" />
5936                         </actions>
5937                 </permacrud>
5938         </class>
5939
5940         <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">
5941                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_id_seq">
5942                         <field reporter:label="Subordinate Organizational Units" name="children" oils_persist:virtual="true" reporter:datatype="org_unit"/>
5943                         <field reporter:label="Billing Address" name="billing_address" reporter:datatype="link"/>
5944                         <field reporter:label="Holds Receiving Address" name="holds_address" reporter:datatype="link"/>
5945                         <field reporter:label="Organizational Unit ID" name="id" reporter:datatype="org_unit" reporter:selector="shortname"/>
5946                         <field reporter:label="ILL Receiving Address" name="ill_address" reporter:datatype="link"/>
5947                         <field reporter:label="Mailing Address" name="mailing_address" reporter:datatype="link"/>
5948                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
5949                         <field reporter:label="Organizational Unit Type" name="ou_type" reporter:datatype="link"/>
5950                         <field reporter:label="Parent Organizational Unit" name="parent_ou" reporter:datatype="link"/>
5951                         <field reporter:label="Short (Policy) Name" name="shortname" reporter:datatype="text" oils_obj:required="true" oils_obj:validate="^.+$"/>
5952                         <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
5953                         <field reporter:label="Phone Number" name="phone" reporter:datatype="text"/>
5954                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
5955                         <field reporter:label="Fiscal Calendar" name="fiscal_calendar" reporter:datatype="link"/>
5956                         <field reporter:label="Users" name="users" oils_persist:virtual="true" reporter:datatype="link"/>
5957                         <field reporter:label="Closed Dates" name="closed_dates" oils_persist:virtual="true" reporter:datatype="link"/>
5958                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
5959                         <field reporter:label="Settings" name="settings" oils_persist:virtual="true" reporter:datatype="link"/>
5960                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link"/>
5961                         <field reporter:label="Checkins" name="checkins" oils_persist:virtual="true" reporter:datatype="link"/>
5962                         <field reporter:label="Workstations" name="workstations" oils_persist:virtual="true" reporter:datatype="link"/>
5963                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
5964                         <field reporter:label="Copy Location Orders" name="copy_location_orders" oils_persist:virtual="true" reporter:datatype="link"/>
5965                         <field reporter:label="Transit Copy Prev Destinations" name="atc_prev_dests" oils_persist:virtual="true" reporter:datatype="link"/>
5966                         <field reporter:label="Reservation Requests" name="resv_requests" oils_persist:virtual="true" reporter:datatype="link"/>
5967                         <field reporter:label="Reservation Pickups" name="resv_pickups" oils_persist:virtual="true" reporter:datatype="link"/>
5968                         <field reporter:label="Resource Types" name="rsrc_types" oils_persist:virtual="true" reporter:datatype="link"/>
5969                         <field reporter:label="Resources" name="resources" oils_persist:virtual="true" reporter:datatype="link"/>
5970                         <field reporter:label="Resource Attributes" name="rsrc_attrs" oils_persist:virtual="true" reporter:datatype="link"/>
5971                         <field reporter:label="Attribute Values" name="attr_vals" oils_persist:virtual="true" reporter:datatype="link"/>
5972                         <field reporter:label="Hours of Operation" name="hours_of_operation" oils_persist:virtual="true" reporter:datatype="link"/>
5973                 </fields>
5974                 <links>
5975                         <link field="billing_address" reltype="has_a" key="id" map="" class="aoa"/>
5976                         <link field="holds_address" reltype="has_a" key="id" map="" class="aoa"/>
5977                         <link field="ou_type" reltype="has_a" key="id" map="" class="aout"/>
5978                         <link field="mailing_address" reltype="has_a" key="id" map="" class="aoa"/>
5979                         <link field="parent_ou" reltype="has_a" key="id" map="" class="aou"/>
5980                         <link field="ill_address" reltype="has_a" key="id" map="" class="aoa"/>
5981                         <link field="fiscal_calendar" reltype="has_a" key="id" map="" class="acqfc"/>
5982                         <link field="users" reltype="has_many" key="home_ou" map="" class="au"/>
5983                         <link field="closed_dates" reltype="has_many" key="org_unit" map="" class="aoucd"/>
5984                         <link field="children" reltype="has_many" key="parent_ou" map="" class="aou"/>
5985                         <link field="circulations" reltype="has_many" key="circ_lib" map="" class="circ"/>
5986                         <link field="settings" reltype="has_many" key="org_unit" map="" class="aous"/>
5987                         <link field="addresses" reltype="has_many" key="org_unit" map="" class="aoa"/>
5988                         <link field="checkins" reltype="has_many" key="checkin_lib" map="" class="circ"/>
5989                         <link field="workstations" reltype="has_many" key="owning_lib" map="" class="aws"/>
5990                         <link field="fund_alloc_pcts" reltype="has_many" key="org" map="" class="acqfap"/>
5991                         <link field="copy_location_orders" reltype="has_many" key="org" map="" class="acplo"/>
5992                         <link field="atc_prev_dests" reltype="has_many" key="prev_dest" map="" class="atc"/>
5993                         <link field="resv_requests" reltype="has_many" key="request_lib" map="" class="bresv"/>
5994                         <link field="resv_pickups" reltype="has_many" key="pickup_lib" map="" class="bresv"/>
5995                         <link field="rsrc_types" reltype="has_many" key="owner" map="" class="brt"/>
5996                         <link field="resources" reltype="has_many" key="owner" map="" class="brsrc"/>
5997                         <link field="rsrc_attrs" reltype="has_many" key="owner" map="" class="bra"/>
5998                         <link field="attr_vals" reltype="has_many" key="owner" map="" class="brav"/>
5999                         <link field="hours_of_operation" reltype="might_have" key="id" map="" class="aouhoo"/>
6000                 </links>
6001         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6002             <actions>
6003                 <create permission="CREATE_ORG_UNIT" context_field="parent_ou"/>
6004                 <retrieve />
6005                 <update permission="UPDATE_ORG_UNIT" context_field="id"/>
6006                 <delete permission="DELETE_ORG_UNIT" context_field="parent_ou"/>
6007             </actions>
6008         </permacrud>
6009         </class>
6010         <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">
6011                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_id_seq">
6012                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6013                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
6014                         <field reporter:label="Purpose" name="purpose" reporter:datatype="text"/>
6015                 </fields>
6016                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6017                         <actions>
6018                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6019                                 <retrieve/>
6020                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6021                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6022                         </actions>
6023                 </permacrud>
6024         </class>
6025         <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">
6026                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_custom_tree_node_id_seq">
6027                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
6028                         <field reporter:label="Tree" name="tree" reporter:datatype="link"/>
6029                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
6030                         <field reporter:label="Parent" name="parent_node" reporter:datatype="link"/>
6031                         <field reporter:label="Sibling Sort Order" name="sibling_order" reporter:datatype="int"/>
6032                         <field reporter:label="Children" name="children" reporter:datatype="link" oils_persist:virtual="true" />
6033                 </fields>
6034                 <links>
6035                         <link field="tree" reltype="has_a" key="id" map="" class="aouct"/>
6036                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
6037                         <link field="parent_node" reltype="has_a" key="id" map="" class="aouctn"/>
6038                         <link field="children" reltype="has_many" key="parent_node" map="" class="aouctn"/>
6039                 </links>
6040                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6041                         <actions>
6042                                 <create permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6043                                 <retrieve/>
6044                                 <update permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6045                                 <delete permission="ADMIN_ORG_UNIT_CUSTOM_TREE" global_required="true" />
6046                         </actions>
6047                 </permacrud>
6048         </class>
6049         <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">
6050                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_id_seq">
6051                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6052                         <field name="btype" reporter:datatype="text"/>
6053                         <field name="id" reporter:datatype="id" />
6054                         <field name="name"  reporter:datatype="text"/>
6055                         <field name="description" reporter:datatype="text"/>
6056                         <field name="owner" reporter:datatype="link"/>
6057                         <field name="pub" reporter:datatype="bool"/>
6058                         <field name="create_time" reporter:datatype="timestamp" />
6059                 </fields>
6060                 <links>
6061                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6062                         <link field="items" reltype="has_many" key="bucket" map="" class="ccnbi"/>
6063                 </links>
6064         </class>
6065         <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">
6066                 <fields oils_persist:primary="id" oils_persist:sequence="container.call_number_bucket_note_id_seq">
6067                         <field name="id" reporter:datatype="id" />
6068                         <field name="bucket" reporter:datatype="link"/>
6069                         <field name="note" reporter:datatype="text" />
6070                 </fields>
6071                 <links>
6072                         <link field="bucket" reltype="has_a" key="id" map="" class="ccnb"/>
6073                 </links>
6074         </class>
6075         <class id="asc" controller="open-ils.cstore" oils_obj:fieldmapper="asset::stat_cat" oils_persist:tablename="asset.stat_cat" reporter:label="Asset Statistical Category">
6076                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_id_seq">
6077                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6078                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6079                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6080                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6081                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6082                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6083                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6084                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6085                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6086                 </fields>
6087                 <links>
6088                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6089                         <link field="sip_field" reltype="has_a" key="field" map="" class="ascsf"/>
6090                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="asce"/>
6091                 </links>
6092         </class>
6093         <class id="ac" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="actor::card" oils_persist:tablename="actor.card" reporter:label="Library Card">
6094                 <fields oils_persist:primary="id" oils_persist:sequence="actor.card_id_seq">
6095                         <field reporter:label="IsActive?" name="active" reporter:datatype="bool"/>
6096                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6097                         <field reporter:label="Card ID" name="id" reporter:datatype="id" />
6098                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6099                 </fields>
6100                 <links>
6101                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6102                 </links>
6103                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6104                         <actions>
6105                                 <retrieve permission="VIEW_USER">
6106                                         <context link="usr" field="home_ou" />
6107                                 </retrieve>
6108                         </actions>
6109                 </permacrud>
6110         </class>
6111     <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">
6112         <fields oils_persist:primary="field">
6113             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
6114             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
6115             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
6116         </fields>
6117         <links/>
6118         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6119             <actions>
6120                 <create permission="CREATE_PATRON_STAT_CAT" global_required="true"/>
6121                 <retrieve />
6122                 <update permission="UPDATE_PATRON_STAT_CAT" global_required="true"/>
6123                 <delete permission="DELETE_PATRON_STAT_CAT" global_required="true"/>
6124             </actions>
6125         </permacrud>
6126     </class>
6127         <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">
6128                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_id_seq">
6129                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
6130                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6131                         <field reporter:label="Stat Cat ID" name="id" reporter:datatype="id" reporter:selector="name"/>
6132                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6133                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
6134                         <field reporter:label="Owning Library" name="owner" reporter:datatype="org_unit"/>
6135                         <field reporter:label="User Summary" name="usr_summary" reporter:datatype="bool"/>
6136                         <field reporter:label="SIP Field" name="sip_field" reporter:datatype="link"/>
6137                         <field reporter:label="SIP Format" name="sip_format" reporter:datatype="text"/>
6138                         <field reporter:label="Checkout Archive" name="checkout_archive" reporter:datatype="bool"/>
6139                         <field reporter:label="Required" name="required" reporter:datatype="bool"/>
6140                         <field reporter:label="Free Text" name="allow_freetext" reporter:datatype="bool"/>
6141                 </fields>
6142                 <links>
6143                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6144                         <link field="sip_field" reltype="has_a" key="field" map="" class="actscsf"/>
6145                         <link field="entries" reltype="has_many" key="stat_cat" map="" class="actsce"/>
6146                         <link field="default_entries" reltype="has_many" key="stat_cat" map="" class="actsced"/>
6147                 </links>
6148         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6149             <actions>
6150                 <create permission="CREATE_PATRON_STAT_CAT" context_field="owner"/>
6151                 <retrieve />
6152                 <update permission="UPDATE_PATRON_STAT_CAT" context_field="owner"/>
6153                 <delete permission="DELETE_PATRON_STAT_CAT" context_field="owner"/>
6154             </actions>
6155         </permacrud>
6156         </class>
6157         <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">
6158                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.series_field_entry_id_seq">
6159                         <field name="field" reporter:datatype="link"/>
6160                         <field name="id" reporter:datatype="id" />
6161                         <field name="source" reporter:datatype="link"/>
6162                         <field name="value"  reporter:datatype="text"/>
6163                 </fields>
6164                 <links>
6165                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6166                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6167                 </links>
6168         </class>
6169         <class id="cub" controller="open-ils.cstore" oils_obj:fieldmapper="container::user_bucket" oils_persist:tablename="container.user_bucket" reporter:label="User Bucket">
6170                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_id_seq">
6171                         <field name="items" oils_persist:virtual="true" reporter:datatype="link"/>
6172                         <field name="btype" reporter:datatype="text"/>
6173                         <field name="id" reporter:datatype="id" />
6174                         <field name="name"  reporter:datatype="text"/>
6175                         <field name="description" reporter:datatype="text"/>
6176                         <field name="owner" reporter:datatype="link"/>
6177                         <field name="pub" reporter:datatype="bool"/>
6178                         <field name="create_time" reporter:datatype="timestamp" />
6179                 </fields>
6180                 <links>
6181                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6182                         <link field="items" reltype="has_many" key="bucket" map="" class="cubi"/>
6183                 </links>
6184         </class>
6185         <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">
6186                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_note_id_seq">
6187                         <field name="id" reporter:datatype="id" />
6188                         <field name="bucket" reporter:datatype="link"/>
6189                         <field name="note" reporter:datatype="text" />
6190                 </fields>
6191                 <links>
6192                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6193                 </links>
6194         </class>
6195         <class id="mcrp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::credit_payment" oils_persist:tablename="money.credit_payment" reporter:label="House Credit Payment">
6196                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6197                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6198                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6199                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6200                         <field reporter:label="Pyament ID" name="id" reporter:datatype="id" />
6201                         <field reporter:label="Payment Note" name="note"  reporter:datatype="text"/>
6202                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6203                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
6204                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true"  reporter:datatype="text"/>
6205                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6206                 </fields>
6207                 <links>
6208                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6209                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6210                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6211                 </links>
6212         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6213             <actions>
6214                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6215                     <context link="xact" jump="usr" field="home_ou"/>
6216                 </retrieve>
6217                         </actions>
6218                 </permacrud>
6219         </class>
6220         <class id="afr" controller="open-ils.cstore" oils_obj:fieldmapper="authority::full_rec" oils_persist:tablename="authority.full_rec" reporter:label="Full Authority Record">
6221                 <fields oils_persist:primary="id" oils_persist:sequence="authority.full_rec_id_seq">
6222                         <field name="id" reporter:datatype="id" />
6223                         <field name="ind1" />
6224                         <field name="ind2" />
6225                         <field name="record" />
6226                         <field name="subfield" />
6227                         <field name="tag" />
6228                         <field name="value" />
6229                 </fields>
6230                 <links>
6231                         <link field="record" reltype="has_a" key="id" map="" class="are"/>
6232                 </links>
6233         </class>
6234         <class id="aalink" controller="open-ils.cstore" oils_obj:fieldmapper="authority::authority_linking" oils_persist:tablename="authority.authority_linking" reporter:label="Authority to Authority Linking">
6235                 <fields oils_persist:primary="id" oils_persist:sequence="authority.authority_linking_id_seq">
6236                         <field name="id" reporter:label="ID" reporter:datatype="id" />
6237                         <field name="source" reporter:label="Source Record" reporter:datatype="link" />
6238                         <field name="target" reporter:label="Target Record" reporter:datatype="link" />
6239                         <field name="field" reporter:label="Authority Field" reporter:datatype="link" />
6240                 </fields>
6241                 <links>
6242                         <link field="source" reltype="has_a" key="id" map="" class="are"/>
6243                         <link field="target" reltype="has_a" key="id" map="" class="are"/>
6244                         <link field="field" reltype="has_a" key="id" map="" class="acsaf"/>
6245                 </links>
6246         </class>
6247         <class id="cnct" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::non_cataloged_type" oils_persist:tablename="config.non_cataloged_type" reporter:label="Non-cataloged Type">
6248                 <fields oils_persist:primary="id" oils_persist:sequence="config.non_cataloged_type_id_seq">
6249                         <field reporter:label="Circulation Duration" name="circ_duration" reporter:datatype="interval"/>
6250                         <field reporter:label="Non-cat Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6251                         <field reporter:label="In House?" name="in_house" reporter:datatype="bool"/>
6252                         <field reporter:label="Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6253                         <field reporter:label="Owning Library" name="owning_lib"  reporter:datatype="org_unit"/>
6254                 </fields>
6255                 <links>
6256                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6257                 </links>
6258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6259             <actions>
6260                 <create permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6261                 <retrieve/>
6262                 <update permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6263                 <delete permission="CREATE_NON_CAT_TYPE" context_field="owning_lib"/>
6264             </actions>
6265         </permacrud>
6266
6267         </class>
6268         <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">
6269                 <fields oils_persist:primary="id" oils_persist:sequence="actor.org_unit_type_id_seq">
6270                         <field reporter:label="Subordinate Types" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6271                         <field reporter:label="Can Have Users?" name="can_have_users" reporter:datatype="bool"/>
6272                         <field reporter:label="Can Have Volumes?" name="can_have_vols" reporter:datatype="bool"/>
6273                         <field reporter:label="Type Depth" name="depth" reporter:datatype="int" />
6274                         <field reporter:label="Type ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6275                         <field reporter:label="Type Name" name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
6276                         <field reporter:label="OPAC Label" name="opac_label"  reporter:datatype="text" oils_persist:i18n="true"/>
6277                         <field reporter:label="Parent Type" name="parent" reporter:datatype="link"/>
6278                         <field reporter:label="Org Units" name="org_units" oils_persist:virtual="true"  reporter:datatype="org_unit"/>
6279                 </fields>
6280                 <links>
6281                         <link field="parent" reltype="has_a" key="id" map="" class="aout"/>
6282                         <link field="children" reltype="has_many" key="parent" map="" class="aout"/>
6283                         <link field="org_units" reltype="has_many" key="ou_type" map="" class="aou"/>
6284                 </links>
6285         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6286             <actions>
6287                 <create permission="CREATE_ORG_TYPE" global_required="true"/>
6288                 <retrieve/>
6289                 <update permission="UPDATE_ORG_TYPE" global_required="true"/>
6290                 <delete permission="DELETE_ORG_TYPE" global_required="true"/>
6291             </actions>
6292         </permacrud>
6293         </class>
6294         <class id="bren" controller="open-ils.cstore" oils_obj:fieldmapper="biblio::record_note" oils_persist:tablename="biblio.record_note" reporter:label="Bib Record Note">
6295                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_note_id_seq">
6296                         <field name="create_date" reporter:datatype="timestamp"/>
6297                         <field name="creator" reporter:datatype="link"/>
6298                         <field name="edit_date" reporter:datatype="timestamp"/>
6299                         <field name="editor" reporter:datatype="link"/>
6300                         <field name="id" reporter:datatype="id" />
6301                         <field name="pub" reporter:datatype="bool"/>
6302                         <field name="record" reporter:datatype="link"/>
6303                         <field name="value"  reporter:datatype="text"/>
6304                 </fields>
6305                 <links>
6306                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6307                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6308                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
6309                 </links>
6310         </class>
6311         <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">
6312                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6313                         <field name="balance_owed" reporter:datatype="money" />
6314                         <field name="total_owed" reporter:datatype="money" />
6315                         <field name="total_paid" reporter:datatype="money" />
6316                         <field name="usr" reporter:datatype="link"/>
6317                 </fields>
6318                 <links>
6319                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6320                 </links>
6321         </class>
6322         <class id="mg" controller="open-ils.cstore" oils_obj:fieldmapper="money::grocery" oils_persist:tablename="money.grocery" reporter:label="Grocery Transaction">
6323                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6324                         <field reporter:label="Billing Location" name="billing_location" reporter:datatype="link"/>
6325                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6326                         <field reporter:label="Note" name="note"  reporter:datatype="text"/>
6327                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6328                         <field reporter:label="Transaction Finish Timestamp" name="xact_finish" reporter:datatype="timestamp" />
6329                         <field reporter:label="Transaction Start Timestamp" name="xact_start" reporter:datatype="timestamp" />
6330                         <field reporter:label="Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6331                         <field reporter:label="Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6332                         <field reporter:label="Billable Transaction link" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
6333                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6334                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6335                 </fields>
6336                 <links>
6337                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6338                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
6339                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6340                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6341                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
6342                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6343                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6344                 </links>
6345         </class>
6346         <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">
6347                 <fields oils_persist:primary="id" oils_persist:sequence="config.bib_source_id_seq">
6348                         <field name="id" reporter:selector="source" reporter:datatype="id"/>
6349                         <field name="quality" reporter:datatype="int" />
6350                         <field name="source" reporter:datatype="text"/>
6351                         <field name="transcendant" reporter:datatype="bool"/>
6352                         <field name="can_have_copies" reporter:datatype="bool"/>
6353                 </fields>
6354                 <links/>
6355         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6356             <actions>
6357                 <create permission="CREATE_BIB_SOURCE" global_required="true"/>
6358                 <retrieve/>
6359                 <update permission="UPDATE_BIB_SOURCE" global_required="true"/>
6360                 <delete permission="DELETE_BIB_SOURCE" global_required="true"/>
6361             </actions>
6362         </permacrud>
6363         </class>
6364         <class id="mbt" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billable_transaction" oils_persist:tablename="money.billable_xact" reporter:label="Billable Transaction">
6365                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
6366                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
6367                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
6368                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
6369                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
6370                         <field reporter:label="Unrecovered Debt" name="unrecovered" reporter:datatype="bool"/>
6371                         <field reporter:label="Grocery Billing link" name="grocery" oils_persist:virtual="true" reporter:datatype="link"/>
6372                         <field reporter:label="Circulation Billing link" name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6373                         <field reporter:label="Billing Line Items" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
6374                         <field reporter:label="Payment Line Items" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
6375                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="money"/>
6376                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="money"/>
6377                         <field reporter:label="Payment Summary" name="summary" oils_persist:virtual="true" reporter:datatype="link"/>
6378                 </fields>
6379                 <links>
6380                         <link field="grocery" reltype="might_have" key="id" map="" class="mg"/>
6381                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6382                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6383                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
6384                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
6385                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
6386                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
6387                         <link field="summary" reltype="might_have" key="id" map="" class="mbts"/>
6388                 </links>
6389                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6390                         <actions>
6391                                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6392                                         <context link="usr" field="home_ou" />
6393                                 </retrieve>
6394                         </actions>
6395                 </permacrud>
6396         </class>
6397         <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">
6398                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_id_seq">
6399                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6400                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
6401                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6402                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
6403                         <field reporter:label="Default Entries" name="default_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6404                 </fields>
6405                 <links>
6406                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6407                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6408                         <link field="default_entries" reltype="has_many" key="stat_cat_entry" map="" class="actsced"/>
6409                 </links>
6410         </class>
6411         <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">
6412                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_default_id_seq">
6413                         <field reporter:label="Default Entry ID" name="id" reporter:datatype="id" />
6414                         <field reporter:label="Default Entry Value" name="stat_cat_entry" reporter:datatype="link"/>
6415                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
6416                         <field reporter:label="Default for Owner" name="owner" reporter:datatype="link"/>
6417                 </fields>
6418                 <links>
6419                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6420                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
6421                         <link field="stat_cat_entry" reltype="has_a" key="id" map="" class="actsce"/>
6422                 </links>
6423         </class>
6424         <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">
6425                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_id_seq">
6426                         <field name="bucket" reporter:datatype="link"/>
6427                         <field name="id" reporter:datatype="id" />
6428                         <field name="target_user" reporter:datatype="link"/>
6429                         <field name="create_time" reporter:datatype="timestamp" />
6430                         <field name="pos" reporter:datatype="int" />
6431                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
6432                 </fields>
6433                 <links>
6434                         <link field="target_user" reltype="has_a" key="id" map="" class="au"/>
6435                         <link field="bucket" reltype="has_a" key="id" map="" class="cub"/>
6436             <link field="notes" reltype="has_many" map="" key="item" class="cubin"/>
6437                 </links>
6438         </class>
6439         <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">
6440                 <fields oils_persist:primary="id" oils_persist:sequence="container.user_bucket_item_note_id_seq">
6441                         <field name="id" reporter:datatype="id" />
6442                         <field name="item" reporter:datatype="link"/>
6443                         <field name="note" reporter:datatype="text" />
6444                 </fields>
6445                 <links>
6446                         <link field="item" reltype="has_a" key="id" map="" class="cubi"/>
6447                 </links>
6448         </class>
6449         <class id="mus" controller="open-ils.cstore" oils_obj:fieldmapper="money::user_summary" oils_persist:tablename="money.usr_summary" reporter:label="User Summary">
6450                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6451                         <field name="balance_owed" reporter:datatype="money" />
6452                         <field name="total_owed" reporter:datatype="money" />
6453                         <field name="total_paid" reporter:datatype="money" />
6454                         <field name="usr" reporter:datatype="link"/>
6455                 </fields>
6456                 <links>
6457                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6458                 </links>
6459         </class>
6460         <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">
6461                 <fields oils_persist:primary="code" oils_persist:sequence="">
6462                         <field reporter:label="LitF Code" name="code" reporter:datatype="text"/>
6463                         <field reporter:label="LitF Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6464                         <field reporter:label="LitF Name" name="value" 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="CREATE_MARC_CODE" global_required="true"/>
6470                 <retrieve/>
6471                 <update permission="UPDATE_MARC_CODE" global_required="true"/>
6472                 <delete permission="DELETE_MARC_CODE" global_required="true"/>
6473             </actions>
6474         </permacrud>
6475         </class>
6476         <class id="mwp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::work_payment" oils_persist:tablename="money.work_payment" reporter:label="Work Payment">
6477                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6478                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6479                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6480                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6481                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6482                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6483                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6484                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6485                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6486                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6487                 </fields>
6488                 <links>
6489                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6490                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6491                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6492                 </links>
6493         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6494             <actions>
6495                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6496                     <context link="xact" jump="usr" field="home_ou"/>
6497                 </retrieve>
6498                         </actions>
6499                 </permacrud>
6500         </class>
6501         <class id="mgp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::goods_payment" oils_persist:tablename="money.goods_payment" reporter:label="Goods Payment">
6502                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6503                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6504                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6505                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6506                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6507                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6508                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6509                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="link"/>
6510                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6511                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6512                 </fields>
6513                 <links>
6514                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6515                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6516                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6517                 </links>
6518         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6519             <actions>
6520                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6521                     <context link="xact" jump="usr" field="home_ou"/>
6522                 </retrieve>
6523                         </actions>
6524                 </permacrud>
6525         </class>
6526         <class id="aoc" controller="open-ils.cstore" oils_obj:fieldmapper="action::open_circulation" oils_persist:tablename="action.open_circulation" reporter:label="Open Circulation">
6527                 <fields oils_persist:primary="id" oils_persist:sequence="">
6528                         <field name="checkin_lib" reporter:datatype="link"/>
6529                         <field name="checkin_staff" reporter:datatype="link"/>
6530                         <field name="checkin_time" reporter:datatype="timestamp"/>
6531                         <field name="circ_lib"  reporter:datatype="org_unit"/>
6532                         <field name="circ_staff" reporter:datatype="link"/>
6533                         <field name="desk_renewal" reporter:datatype="bool"/>
6534                         <field name="due_date" reporter:datatype="timestamp"/>
6535                         <field name="duration" reporter:datatype="interval"/>
6536                         <field name="duration_rule" reporter:datatype="link"/>
6537                         <field name="fine_interval" reporter:datatype="interval"/>
6538                         <field name="id" reporter:datatype="id" />
6539                         <field name="max_fine" reporter:datatype="money" />
6540                         <field name="max_fine_rule" reporter:datatype="link"/>
6541                         <field name="opac_renewal" reporter:datatype="bool"/>
6542                         <field name="phone_renewal" reporter:datatype="bool"/>
6543                         <field name="recurring_fine" reporter:datatype="money" />
6544                         <field name="recurring_fine_rule" reporter:datatype="link"/>
6545                         <field name="renewal_remaining" reporter:datatype="int" />
6546             <field name="grace_period" reporter:datatype="interval" />
6547                         <field name="stop_fines" reporter:datatype="text"/>
6548                         <field name="stop_fines_time" reporter:datatype="timestamp"/>
6549                         <field name="target_copy" reporter:datatype="link"/>
6550                         <field name="usr" reporter:datatype="link"/>
6551                         <field name="xact_finish" reporter:datatype="timestamp" />
6552                         <field name="xact_start" reporter:datatype="timestamp" />
6553                         <field name="circulation" oils_persist:virtual="true" reporter:datatype="link"/>
6554                 </fields>
6555                 <links>
6556                         <link field="circulation" reltype="might_have" key="id" map="" class="circ"/>
6557                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
6558                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
6559                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
6560                 </links>
6561         </class>
6562         <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">
6563                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.subject_field_entry_id_seq">
6564                         <field name="field" reporter:datatype="link"/>
6565                         <field name="id" reporter:datatype="id" />
6566                         <field name="source" reporter:datatype="link"/>
6567                         <field name="value" reporter:datatype="text"/>
6568                 </fields>
6569                 <links>
6570                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6571                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6572                 </links>
6573         </class>
6574         <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">
6575                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_recurring_fine_id_seq">
6576                         <field name="high" reporter:datatype="money" />
6577                         <field name="id" reporter:selector="name" reporter:datatype="id"/>
6578                         <field name="low" reporter:datatype="money" />
6579                         <field name="name" reporter:datatype="text"/>
6580                         <field name="normal" reporter:datatype="money" />
6581                         <field name="recurrence_interval" reporter:datatype="interval"/>
6582             <field name="grace_period" reporter:datatype="interval" />
6583                 </fields>
6584                 <links/>
6585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6586             <actions>
6587                 <create permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6588                 <retrieve/>
6589                 <update permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6590                 <delete permission="ADMIN_RECURRING_FINE_RULE" global_required="true"/>
6591             </actions>
6592         </permacrud>
6593         </class>
6594         <class id="mckp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::check_payment" oils_persist:tablename="money.check_payment" reporter:label="Check Payment">
6595                 <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
6596                         <field reporter:label="Accepting Staff Member" name="accepting_usr" reporter:datatype="link"/>
6597                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
6598                         <field reporter:label="Amount Collected" name="amount_collected" reporter:datatype="money" />
6599                         <field reporter:label="Workstation link" name="cash_drawer" reporter:datatype="link"/>
6600                         <field reporter:label="Check Number" name="check_number" reporter:datatype="int" />
6601                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
6602                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
6603                         <field reporter:label="Payment Timestamp" name="payment_ts" reporter:datatype="timestamp"/>
6604                         <field reporter:label="Transaction link" name="xact" reporter:datatype="link"/>
6605                         <field reporter:label="Payment link" name="payment" oils_persist:virtual="true" reporter:datatype="link"/>
6606                         <field reporter:label="Payment Type" name="payment_type" oils_persist:virtual="true" reporter:datatype="text"/>
6607                 </fields>
6608                 <links>
6609                         <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
6610                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
6611                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
6612                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
6613                 </links>
6614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6615             <actions>
6616                 <retrieve permission="VIEW_USER_TRANSACTIONS">
6617                     <context link="xact" jump="usr" field="home_ou"/>
6618                 </retrieve>
6619                         </actions>
6620                 </permacrud>
6621         </class>
6622         <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">
6623                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_id_seq">
6624                         <field reporter:label="Age Hold Protection" name="age_protect" reporter:datatype="link"/>
6625                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6626                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
6627                         <field reporter:label="Call Number/Volume" name="call_number" reporter:datatype="link"/>
6628                         <field reporter:label="Circulation Type (MARC)" name="circ_as_type" reporter:datatype="text"/>
6629                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6630                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
6631                         <field reporter:label="Can Circulate" name="circulate" reporter:datatype="bool"/>
6632                         <field reporter:label="Copy Number on Volume" name="copy_number" reporter:datatype="text"/>
6633                         <field reporter:label="Creation Date/Time" name="create_date" reporter:datatype="timestamp"/>
6634                         <field reporter:label="Active Date/Time" name="active_date" reporter:datatype="timestamp"/>
6635                         <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
6636                         <field reporter:label="Is Deleted" name="deleted" reporter:datatype="bool"/>
6637                         <field reporter:label="Dummy ISBN" name="dummy_isbn" reporter:datatype="text"/>
6638                         <field reporter:label="Is Deposit Required" name="deposit" reporter:datatype="bool"/>
6639                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money" />
6640                         <field reporter:label="Precat Dummy Author" name="dummy_author" reporter:datatype="text"/>
6641                         <field reporter:label="Precat Dummy Title" name="dummy_title" reporter:datatype="text"/>
6642                         <field reporter:label="Last Edit Date/Time" name="edit_date" reporter:datatype="timestamp"/>
6643                         <field reporter:label="Last Editing User" name="editor" reporter:datatype="link"/>
6644                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6645                         <field reporter:label="Is Holdable" name="holdable" reporter:datatype="bool" />
6646                         <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
6647                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6648                         <field reporter:label="Shelving Location" name="location" reporter:datatype="link"/>
6649                         <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool" />
6650                         <field reporter:label="Price" name="price" reporter:datatype="money" />
6651                         <field reporter:label="Is Reference" name="ref" reporter:datatype="bool"/>
6652                         <field reporter:label="Copy Status" name="status" reporter:datatype="link"/>
6653                         <field reporter:label="Copy Status Changed Time" name="status_changed_time" reporter:datatype="timestamp"/>
6654                         <field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool"/>
6655                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6656                         <field reporter:label="Cost" name="cost" reporter:datatype="money"/>
6657                         <field reporter:label="Copy Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link"/>
6658                         <field reporter:label="Stat-Cat entry maps" name="stat_cat_entry_copy_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6659                         <field reporter:label="Circulations" name="circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6660                         <field reporter:label="Aged (patronless) Circulations" name="aged_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6661                         <field reporter:label="Combined Aged and Active Circulations" name="all_circulations" oils_persist:virtual="true" reporter:datatype="link"/>
6662                         <field reporter:label="Total Circulations" name="total_circ_count" oils_persist:virtual="true" reporter:datatype="link"/>
6663                         <field reporter:label="Last Circulation Date" name="last_circ" oils_persist:virtual="true" reporter:datatype="link"/>
6664                         <field reporter:label="Holds" name="holds" oils_persist:virtual="true" reporter:datatype="link"/>
6665                         <field reporter:label="Statistical Category Entries" name="stat_cat_entries" oils_persist:virtual="true" reporter:datatype="link"/>
6666                         <field reporter:label="Monograph Parts" name="parts" oils_persist:virtual="true" reporter:datatype="link"/>
6667                         <field reporter:label="Peer Record Maps" name="peer_record_maps" oils_persist:virtual="true" reporter:datatype="link"/>
6668                         <field reporter:label="Peer Records" name="peer_records" oils_persist:virtual="true" reporter:datatype="link"/>
6669                         <field reporter:label="Last Captured Hold" name="last_captured_hold" oils_persist:virtual="true" reporter:datatype="link"/>
6670                 </fields>
6671                 <links>
6672                         <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
6673                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
6674                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6675                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6676                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6677                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6678                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6679                         <link field="holds" reltype="has_many" key="target_copy" map="hold" class="ahcm"/>
6680                         <link field="stat_cat_entry_copy_maps" reltype="has_many" key="owning_copy" map="" class="ascecm"/>
6681                         <link field="notes" reltype="has_many" key="owning_copy" map="" class="acpn"/>
6682                         <link field="stat_cat_entries" reltype="has_many" key="owning_copy" map="stat_cat_entry" class="ascecm"/>
6683                         <link field="circulations" reltype="has_many" key="target_copy" map="" class="circ"/>
6684                         <link field="aged_circulations" reltype="has_many" key="target_copy" map="" class="acirc"/>
6685                         <link field="all_circulations" reltype="has_many" key="target_copy" map="" class="combcirc"/>
6686                         <link field="total_circ_count" reltype="might_have" key="id" map="" class="erfcc"/>
6687                         <link field="last_circ" reltype="might_have" key="id" map="" class="rlc"/>
6688                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6689                         <link field="parts" reltype="has_many" key="target_copy" map="part" class="acpm"/>
6690                         <link field="peer_record_maps" reltype="has_many" key="target_copy" map="" class="bpbcm"/>
6691                         <link field="peer_records" reltype="has_many" key="target_copy" map="peer_record" class="bpbcm"/>
6692                         <link field="last_captured_hold" reltype="has_a" key="current_copy" map="" class="alhr"/>
6693                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6694                 </links>
6695         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6696             <actions>
6697                 <create permission="CREATE_COPY">
6698                     <context link="call_number" field="owning_lib"/>
6699                 </create>
6700                 <retrieve/>
6701                 <update permission="UPDATE_COPY">
6702                     <context link="call_number" field="owning_lib"/>
6703                 </update>
6704                 <delete permission="DELETE_COPY">
6705                     <context link="call_number" field="owning_lib"/>
6706                 </delete>
6707             </actions>
6708         </permacrud>
6709         </class>
6710
6711         <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">
6712                 <fields oils_persist:primary="id" oils_persist:sequence="asset.copy_template_id_seq">
6713                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name" />
6714                         <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
6715                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
6716                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
6717                         <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
6718                         <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
6719                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
6720                         <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
6721                         <field reporter:label="Status" name="status" reporter:datatype="link"/>
6722                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
6723                         <field reporter:label="Loan Duration" name="loan_duration" reporter:datatype="int"/>
6724                         <field reporter:label="Fine Level" name="fine_level" reporter:datatype="int"/>
6725                         <field reporter:label="Age Protect" name="age_protect" reporter:datatype="int"/>
6726                         <field reporter:label="Circulate?" name="circulate" reporter:datatype="bool"/>
6727                         <field reporter:label="Deposit?" name="deposit" reporter:datatype="bool"/>
6728                         <field reporter:label="Reference?" name="ref" reporter:datatype="bool"/>
6729                         <field reporter:label="Holdable?" name="holdable" reporter:datatype="bool"/>
6730                         <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="money"/>
6731                         <field reporter:label="Price" name="price" reporter:datatype="money"/>
6732                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link"/>
6733                         <field reporter:label="Circ As Type" name="circ_as_type" reporter:datatype="text"/>
6734                         <field reporter:label="Alert Message" name="alert_message" reporter:datatype="text"/>
6735                         <field reporter:label="OPAC Visible?" name="opac_visible" reporter:datatype="bool"/>
6736                         <field reporter:label="Floating Group" name="floating" reporter:datatype="link"/>
6737                         <field reporter:label="Mint Condition?" name="mint_condition" reporter:datatype="bool"/>
6738                 </fields>
6739                 <links>
6740                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
6741                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
6742                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
6743                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6744                         <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
6745                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
6746                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
6747                         <link field="floating" reltype="has_a" key="id" map="" class="cfg"/>
6748                 </links>
6749                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6750                         <actions>
6751                                 <create permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6752                                 <retrieve />
6753                                 <update permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6754                                 <delete permission="ADMIN_ASSET_COPY_TEMPLATE" global_required="true"/>
6755                         </actions>
6756                 </permacrud>
6757         </class>
6758
6759         <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">
6760                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_age_hold_protect_id_seq">
6761                         <field reporter:label="Item Age" name="age" reporter:datatype="interval"/>
6762                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6763                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6764                         <field reporter:label="Allowed Proximity" name="prox" reporter:datatype="int" />
6765                 </fields>
6766                 <links/>
6767         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6768             <actions>
6769                 <create permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6770                 <retrieve/>
6771                 <update permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6772                 <delete permission="ADMIN_AGE_PROTECT_RULE" global_required="true"/>
6773             </actions>
6774         </permacrud>
6775         </class>
6776         <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">
6777                 <fields oils_persist:primary="id" oils_persist:sequence="config.rule_max_fine_id_seq">
6778                         <field reporter:label="Max Fine Amount" name="amount" reporter:datatype="money" />
6779                         <field reporter:label="Rule ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6780                         <field reporter:label="Rule Name" name="name" reporter:datatype="text"/>
6781                         <field reporter:label="Is Percent" name="is_percent" reporter:datatype="bool"/>
6782                 </fields>
6783                 <links/>
6784         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6785             <actions>
6786                 <create permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6787                 <retrieve/>
6788                 <update permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6789                 <delete permission="ADMIN_MAX_FINE_RULE" global_required="true"/>
6790             </actions>
6791         </permacrud>
6792         </class>
6793         <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">
6794                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_tree_id_seq">
6795                         <field reporter:label="Child Groups" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
6796                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
6797                         <field reporter:label="Group ID" name="id" reporter:selector="name" reporter:datatype="id"/>
6798                         <field reporter:label="Group Name" name="name" reporter:datatype="text" oils_persist:i18n="true"/>
6799                         <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
6800                         <field reporter:label="User Expiration Interval" name="perm_interval" reporter:datatype="interval"/>
6801                         <field reporter:label="Required Permission" name="application_perm" reporter:datatype="text"/>
6802                         <field reporter:label="Is User Group" name="usergroup" reporter:datatype="bool"/>
6803                         <field reporter:label="Hold Priority" name="hold_priority" reporter:datatype="int"/>
6804                 </fields>
6805                 <links>
6806                         <link field="parent" reltype="has_a" key="id" map="" class="pgt"/>
6807                         <link field="children" reltype="has_many" key="parent" map="" class="pgt"/>
6808                 </links>
6809         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6810             <actions>
6811                 <create permission="CREATE_PERM" global_required="true"/>
6812                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
6813                 <update permission="UPDATE_PERM" global_required="true"/>
6814                 <delete permission="DELETE_PERM" global_required="true"/>
6815             </actions>
6816         </permacrud>
6817         </class>
6818         <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">
6819                 <fields oils_persist:primary="id" oils_persist:sequence="action.survey_answer_id_seq">
6820                         <field reporter:label="Responses using this Answer" name="responses" oils_persist:virtual="true" reporter:datatype="link"/>
6821                         <field reporter:label="Answer Text" name="answer" reporter:datatype="text"/>
6822                         <field reporter:label="Answer ID" name="id" reporter:datatype="id" />
6823                         <field reporter:label="Question" name="question" reporter:datatype="link"/>
6824                 </fields>
6825                 <links>
6826                         <link field="question" reltype="has_a" key="id" map="" class="asvq"/>
6827                         <link field="responses" reltype="has_many" key="answer" map="" class="asvr"/>
6828                 </links>
6829         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6830             <actions>
6831                 <create permission="ADMIN_SURVEY">
6832                     <context link="question" jump="survey" field="owner"/>
6833                 </create>
6834                 <retrieve/>
6835                 <update permission="ADMIN_SURVEY">
6836                     <context link="question" jump="survey" field="owner"/>
6837                 </update>
6838                 <delete permission="ADMIN_SURVEY">
6839                     <context link="question" jump="survey" field="owner"/>
6840                 </delete>
6841             </actions>
6842         </permacrud>
6843         </class>
6844         <class id="ancc" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::non_cataloged_circulation" oils_persist:tablename="action.non_cataloged_circulation" reporter:core="true" reporter:label="Non-cataloged Circulation">
6845                 <fields oils_persist:primary="id" oils_persist:sequence="action.non_cataloged_circulation_id_seq">
6846                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
6847                         <field reporter:label="Circulation Date/Time" name="circ_time" reporter:datatype="timestamp"/>
6848                         <field reporter:label="Non-cat Circulation ID" name="id" reporter:datatype="id" />
6849                         <field reporter:label="Non-cat Item Type" name="item_type" reporter:datatype="link"/>
6850                         <field reporter:label="Patron" name="patron" reporter:datatype="link"/>
6851                         <field reporter:label="Circulating Staff" name="staff" reporter:datatype="link"/>
6852                         <field reporter:label="Virtual Due Date/Time" name="duedate" reporter:datatype="timestamp" oils_persist:virtual="true"/>
6853                 </fields>
6854                 <links>
6855                         <link field="item_type" reltype="has_a" key="id" map="" class="cnct"/>
6856                         <link field="staff" reltype="has_a" key="id" map="" class="au"/>
6857                         <link field="patron" reltype="has_a" key="id" map="" class="au"/>
6858                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6859                 </links>
6860                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6861                         <actions>
6862                                 <retrieve permission="VIEW_CIRCULATIONS" context_field="circ_lib" />
6863                         </actions>
6864                 </permacrud>
6865         </class>
6866         <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">
6867                 <fields oils_persist:primary="usr" oils_persist:sequence="">
6868                         <field name="balance_owed" reporter:datatype="money" />
6869                         <field name="total_owed" reporter:datatype="money" />
6870                         <field name="total_paid" reporter:datatype="money" />
6871                         <field name="usr" reporter:datatype="link"/>
6872                 </fields>
6873                 <links>
6874                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6875                 </links>
6876         </class>
6877         <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">
6878                 <fields oils_persist:primary="id" oils_persist:sequence="action.unfulfilled_hold_list_id_seq">
6879                         <field reporter:label="Non-fulfilling Library" name="circ_lib"  reporter:datatype="org_unit"/>
6880                         <field reporter:label="Non-fulfilling Copy" name="current_copy" reporter:datatype="link"/>
6881                         <field reporter:label="Retargeting Date/Time" name="fail_time" reporter:datatype="timestamp"/>
6882                         <field reporter:label="Hold" name="hold" reporter:datatype="link"/>
6883                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
6884                 </fields>
6885                 <links>
6886                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
6887                         <link field="current_copy" reltype="has_a" key="id" map="" class="acp"/>
6888                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
6889                 </links>
6890         </class>
6891         <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">
6892                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.identifier_field_entry_id_seq">
6893                         <field name="field" reporter:datatype="link"/>
6894                         <field name="id" reporter:datatype="id" />
6895                         <field name="source" reporter:datatype="link"/>
6896                         <field name="value" reporter:datatype="text"/>
6897                 </fields>
6898                 <links>
6899                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6900                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6901                 </links>
6902         </class>
6903         <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">
6904                 <fields oils_persist:primary="id" oils_persist:sequence="metabib.title_field_entry_id_seq">
6905                         <field name="field" reporter:datatype="link"/>
6906                         <field name="id" reporter:datatype="id" />
6907                         <field name="source" reporter:datatype="link"/>
6908                         <field name="value" reporter:datatype="text"/>
6909                 </fields>
6910                 <links>
6911                         <link field="source" reltype="has_a" key="id" map="" class="bre"/>
6912                         <link field="field" reltype="has_a" key="id" map="" class="cmf"/>
6913                 </links>
6914         </class>
6915         <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">
6916                 <fields oils_persist:primary="id" oils_persist:sequence="actor.stat_cat_entry_usr_map_id_seq">
6917                         <field reporter:label="Entry ID" name="id" reporter:datatype="id" />
6918                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
6919                         <field reporter:label="Entry Text" name="stat_cat_entry" reporter:datatype="text"/>
6920                         <field reporter:label="User" name="target_usr" reporter:datatype="link"/>
6921                 </fields>
6922                 <links>
6923                         <link field="target_usr" reltype="has_a" key="id" map="" class="au"/>
6924                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
6925                 </links>
6926         </class>
6927         <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">
6928                 <fields oils_persist:primary="id" oils_persist:sequence="permission.grp_perm_map_id_seq">
6929                         <field name="depth" reporter:datatype="int" />
6930                         <field name="grantable" reporter:datatype="bool"/>
6931                         <field name="grp" reporter:datatype="link"/>
6932                         <field name="id" reporter:datatype="id" />
6933                         <field name="perm" reporter:datatype="link"/>
6934                 </fields>
6935                 <links>
6936                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
6937                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6938                 </links>
6939         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
6940             <actions>
6941                 <create permission="ASSIGN_GROUP_PERM" global_required="true"/>
6942                 <retrieve permission="ASSIGN_GROUP_PERM UPDATE_GROUP_PERM REMOVE_GROUP_PERM" global_required="true"/>
6943                 <update permission="UPDATE_GROUP_PERM" global_required="true"/>
6944                 <delete permission="REMOVE_GROUP_PERM" global_required="true"/>
6945             </actions>
6946         </permacrud>
6947         </class>
6948         <class id="ccb" controller="open-ils.cstore" oils_obj:fieldmapper="container::copy_bucket" oils_persist:tablename="container.copy_bucket" reporter:label="Copy Bucket">
6949                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_id_seq">
6950                         <field name="items" oils_persist:virtual="true" />
6951                         <field name="btype" reporter:datatype="text"/>
6952                         <field name="id" reporter:datatype="id" />
6953                         <field name="name" reporter:datatype="text"/>
6954                         <field name="description" reporter:datatype="text"/>
6955                         <field name="owner" reporter:datatype="link"/>
6956                         <field name="pub" reporter:datatype="bool"/>
6957                         <field name="create_time" reporter:datatype="timestamp" />
6958                 </fields>
6959                 <links>
6960                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
6961                         <link field="items" reltype="has_many" key="bucket" map="" class="ccbi"/>
6962                 </links>
6963         </class>
6964         <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">
6965                 <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_note_id_seq">
6966                         <field name="id" reporter:datatype="id" />
6967                         <field name="bucket" reporter:datatype="link"/>
6968                         <field name="note" reporter:datatype="text" />
6969                 </fields>
6970                 <links>
6971                         <link field="bucket" reltype="has_a" key="id" map="" class="ccb"/>
6972                 </links>
6973         </class>
6974         <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">
6975                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_work_ou_map_id_seq">
6976                         <field name="id" reporter:datatype="int" />
6977                         <field name="usr" reporter:datatype="link"/>
6978                         <field name="work_ou" reporter:datatype="link"/>
6979                 </fields>
6980                 <links>
6981                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6982                         <link field="work_ou" reltype="has_a" key="id" map="" class="aou"/>
6983                 </links>
6984         </class>
6985         <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">
6986                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_perm_map_id_seq">
6987                         <field name="depth" reporter:datatype="int"/>
6988                         <field name="grantable" reporter:datatype="bool"/>
6989                         <field name="id" reporter:datatype="id" />
6990                         <field name="perm" reporter:datatype="link"/>
6991                         <field name="usr" reporter:datatype="link"/>
6992                 </fields>
6993                 <links>
6994                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
6995                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
6996                 </links>
6997         </class>
6998         <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">
6999                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_object_perm_map_id_seq">
7000                         <field name="object_id" reporter:datatype="text"/>
7001                         <field name="grantable" reporter:datatype="bool"/>
7002                         <field name="id" reporter:datatype="id" />
7003                         <field name="perm" reporter:datatype="link"/>
7004                         <field name="usr" reporter:datatype="link"/>
7005                         <field name="object_type" reporter:datatype="text"/>
7006                 </fields>
7007                 <links>
7008                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7009                         <link field="perm" reltype="has_a" key="id" map="" class="ppl"/>
7010                 </links>
7011         </class>
7012         <class id="mp" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::payment" oils_persist:tablename="money.payment_view" reporter:core="true" reporter:label="Payments: All">
7013                 <fields oils_persist:primary="id" oils_persist:sequence="">
7014                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7015                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7016                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7017                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7018                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7019                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7020                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7021                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7022                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7023                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7024                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7025                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7026                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7027                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7028                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7029                 </fields>
7030                 <links>
7031                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7032                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7033                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7034                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7035                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7036                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7037                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7038                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7039                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7040                 </links>
7041         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7042             <actions>
7043                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7044                     <context link="xact" jump="usr" field="home_ou"/>
7045                 </retrieve>
7046                         </actions>
7047                 </permacrud>
7048         </class>
7049         <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">
7050                 <fields oils_persist:primary="id" oils_persist:sequence="">
7051                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7052                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7053                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7054                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7055                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7056                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7057                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7058                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7059                         <field reporter:label="Cash Payment Detail" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7060                         <field reporter:label="Credit Card Payment Detail" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7061                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7062                         <field reporter:label="Check Payment Detail" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7063                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7064                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7065                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7066                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7067                 </fields>
7068                 <links>
7069                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7070                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7071                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7072                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7073                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7074                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7075                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7076                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7077                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7078                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7079                 </links>
7080         </class>
7081         <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">
7082                 <fields oils_persist:primary="id" oils_persist:sequence="">
7083                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7084                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7085                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7086                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7087                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7088                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7089                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7090                         <field reporter:label="Work Payment Detail" name="work_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7091                         <field reporter:label="Forgive Payment Detail" name="forgive_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7092                         <field reporter:label="Goods Payment Detail" name="goods_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7093                         <field reporter:label="Credit Payment Detail" name="credit_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7094                         <field reporter:label="Account Adjustment Detail" name="account_adjustment" oils_persist:virtual="true" reporter:datatype="link"/>
7095                 </fields>
7096                 <links>
7097                         <link field="work_payment" reltype="might_have" key="id" map="" class="mwp"/>
7098                         <link field="forgive_payment" reltype="might_have" key="id" map="" class="mfp"/>
7099                         <link field="goods_payment" reltype="might_have" key="id" map="" class="mgp"/>
7100                         <link field="credit_payment" reltype="might_have" key="id" map="" class="mcrp"/>
7101                         <link field="account_adjustment" reltype="might_have" key="id" map="" class="maa"/>
7102                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7103                 </links>
7104         </class>
7105         <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">
7106                 <fields oils_persist:primary="id" oils_persist:sequence="">
7107                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7108                         <field reporter:label="Payment ID" name="id" reporter:datatype="id" />
7109                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7110                         <field reporter:label="Payment Date/Time" name="payment_ts" reporter:datatype="timestamp"/>
7111                         <field reporter:label="Payment Type" name="payment_type" reporter:datatype="text"/>
7112                         <field reporter:label="Billable Transaction" name="xact" reporter:datatype="link"/>
7113                         <field reporter:label="Accepting User" name="accepting_usr" reporter:datatype="link"/>
7114                         <field reporter:label="Cash Drawer" name="cash_drawer" reporter:datatype="link"/>
7115                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7116                         <field reporter:label="Cash Payment" name="cash_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7117                         <field reporter:label="Credit Card Payment" name="credit_card_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7118                         <field reporter:label="Check Payment" name="check_payment" oils_persist:virtual="true" reporter:datatype="link"/>
7119                 </fields>
7120                 <links>
7121                         <link field="cash_payment" reltype="might_have" key="id" map="" class="mcp"/>
7122                         <link field="credit_card_payment" reltype="might_have" key="id" map="" class="mccp"/>
7123                         <link field="check_payment" reltype="might_have" key="id" map="" class="mckp"/>
7124                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7125                         <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
7126                         <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
7127                 </links>
7128         </class>
7129         <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">
7130                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
7131                         <field name="bucket" reporter:datatype="link"/>
7132                         <field name="id" reporter:datatype="id" />
7133                         <field name="target_biblio_record_entry" reporter:datatype="link"/>
7134                         <field name="create_time" reporter:datatype="timestamp" />
7135                         <field name="pos" reporter:datatype="int" />
7136                         <field name="notes" oils_persist:virtual="true" reporter:datatype="link" />
7137                 </fields>
7138                 <links>
7139                         <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre"/>
7140                         <link field="bucket" reltype="has_a" key="id" map="" class="cbreb"/>
7141             <link field="notes" reltype="has_many" map="" key="item" class="cbrebin"/>
7142                 </links>
7143         </class>
7144         <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">
7145                 <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_note_id_seq">
7146                         <field name="id" reporter:datatype="id" />
7147                         <field name="item" reporter:datatype="link"/>
7148                         <field name="note" reporter:datatype="text" />
7149                 </fields>
7150                 <links>
7151                         <link field="item" reltype="has_a" key="id" map="" class="cbrebi"/>
7152                 </links>
7153         </class>
7154         <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">
7155                 <fields oils_persist:primary="id" oils_persist:sequence="asset.stat_cat_entry_id_seq">
7156                         <field reporter:label="Entry ID" name="id" reporter:datatype="int" />
7157                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
7158                         <field reporter:label="Stat Cat" name="stat_cat" reporter:datatype="link"/>
7159                         <field reporter:label="Value" name="value" reporter:datatype="text" oils_persist:i18n="true"/>
7160                 </fields>
7161                 <links>
7162                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
7163                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7164                 </links>
7165         </class>
7166     <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">
7167         <fields oils_persist:primary="field">
7168             <field reporter:label="Field Identifier" name="field" reporter:datatype="text" reporter:selector="name"/>
7169             <field reporter:label="Field Name" name="name" reporter:datatype="text"/>
7170             <field reporter:label="Exclusive?" name="one_only" reporter:datatype="bool"/>
7171         </fields>
7172         <links/>
7173         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7174             <actions>
7175                 <create permission="CREATE_COPY_STAT_CAT" global_required="true"/>
7176                 <retrieve />
7177                 <update permission="UPDATE_COPY_STAT_CAT" global_required="true"/>
7178                 <delete permission="DELETE_COPY_STAT_CAT" global_required="true"/>
7179             </actions>
7180         </permacrud>
7181     </class>
7182         <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">
7183                 <fields oils_persist:primary="id" oils_persist:sequence="action.hold_request_cancel_cause_id_seq">
7184                         <field reporter:label="Cause ID" name="id" reporter:datatype="id" />
7185                         <field reporter:label="Cause Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7186                 </fields>
7187                 <links/>
7188         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7189             <actions>
7190                 <create permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7191                 <retrieve/>
7192                 <update permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7193                 <delete permission="ADMIN_HOLD_CANCEL_CAUSE" global_required="true"/>
7194             </actions>
7195         </permacrud>
7196         </class>
7197
7198
7199         <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">
7200                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7201                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7202                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7203                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7204                         <field reporter:label="Reservation requiring Transit" name="reservation" reporter:datatype="link"/>
7205                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7206                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7207                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7208                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7209                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7210                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7211                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7212                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7213                 </fields>
7214                 <links>
7215                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7216                         <link field="target_copy" reltype="has_a" key="id" map="" class="brsrc"/>
7217                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7218                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7219                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7220                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7221                         <link field="reservation" reltype="has_a" key="id" map="" class="bresv"/>
7222                 </links>
7223         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7224             <actions>
7225                 <create permission="TRANSIT_COPY">
7226                     <context link="target_copy" field="owner"/>
7227                 </create>
7228                 <retrieve/>
7229                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7230                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7231             </actions>
7232         </permacrud>
7233         </class>
7234         <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">
7235                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
7236                         <field reporter:label="Copy Status at Transit" name="copy_status" reporter:datatype="link"/>
7237                         <field reporter:label="Destination Library" name="dest" reporter:datatype="org_unit"/>
7238                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
7239                         <field reporter:label="Hold requiring Transit" name="hold" reporter:datatype="link"/>
7240                         <field reporter:label="Transit ID" name="id" reporter:datatype="id" />
7241                         <field reporter:label="Is Persistent?" name="persistant_transfer" reporter:datatype="bool"/>
7242                         <field reporter:label="Previous Stop" name="prev_hop" reporter:datatype="link"/>
7243                         <field reporter:label="Sending Library" name="source" reporter:datatype="org_unit"/>
7244                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
7245                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
7246                         <field reporter:label="Base Transit" name="transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
7247                         <field reporter:label="Prev Destination Library" name="prev_dest" reporter:datatype="org_unit"/>
7248                 </fields>
7249                 <links>
7250                         <link field="transit_copy" reltype="might_have" key="id" map="" class="atc"/>
7251                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
7252                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
7253                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
7254                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
7255                         <link field="prev_dest" reltype="has_a" key="id" map="" class="aou"/>
7256                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
7257                 </links>
7258         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7259             <actions>
7260                 <create permission="TRANSIT_COPY" context_field="owner">
7261                     <context link="target_copy" field="circ_lib"/>
7262                 </create>
7263                 <retrieve/>
7264                 <update permission="UPDATE_TRANSIT" context_field="dest source"/>
7265                 <delete permission="DELETE_TRANSIT" context_field="dest source"/>
7266             </actions>
7267         </permacrud>
7268         </class>
7269         <class id="mb" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="money::billing" oils_persist:tablename="money.billing" reporter:label="Billing Line Item">
7270                 <fields oils_persist:primary="id" oils_persist:sequence="money.billing_id_seq">
7271                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7272                         <field reporter:label="Billing Timestamp" name="billing_ts" reporter:datatype="timestamp"/>
7273                         <field reporter:label="Legacy Billing Type" name="billing_type" reporter:datatype="text"/>
7274                         <field reporter:label="Billing ID" name="id" reporter:datatype="id" />
7275                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7276                         <field reporter:label="Void Timestamp" name="void_time" reporter:datatype="timestamp"/>
7277                         <field reporter:label="Voided?" name="voided" reporter:datatype="bool"/>
7278                         <field reporter:label="Voiding Staff Member" name="voider" reporter:datatype="link"/>
7279                         <field reporter:label="Transaction" name="xact" reporter:datatype="link"/>
7280                         <field reporter:label="Type" name="btype" reporter:datatype="link"/>
7281                 </fields>
7282                 <links>
7283                         <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
7284                         <link field="voider" reltype="has_a" key="id" map="" class="au"/>
7285                         <link field="btype" reltype="has_a" key="id" map="" class="cbt"/>
7286                 </links>
7287         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7288             <actions>
7289                 <retrieve permission="VIEW_USER_TRANSACTIONS">
7290                     <context link="xact" jump="usr" field="home_ou"/>
7291                 </retrieve>
7292                         </actions>
7293                 </permacrud>
7294         </class>
7295         <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">
7296                 <fields oils_persist:primary="id" oils_persist:sequence="permission.usr_grp_map_id_seq">
7297                         <field name="grp" />
7298                         <field name="id" reporter:datatype="id" />
7299                         <field name="usr" />
7300                 </fields>
7301                 <links>
7302                         <link field="grp" reltype="has_a" key="id" map="" class="pgt"/>
7303                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7304                 </links>
7305         </class>
7306         <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">
7307                 <fields oils_persist:primary="id" oils_persist:sequence="config.i18n_core_id_seq">
7308                         <field name="id" reporter:datatype="id" />
7309                         <field name="fq_field" reporter:datatype="text"/>
7310                         <field name="identity_value" reporter:datatype="text"/>
7311                         <field name="translation" reporter:datatype="text"/>
7312                         <field name="string" reporter:datatype="text"/>
7313                 </fields>
7314                 <links>
7315                         <link field="translation" reltype="has_a" key="code" map="" class="i18n_l"/>
7316                 </links>
7317         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7318             <actions>
7319                 <create permission="CREATE_TRANSLATION" global_required="true"/>
7320                 <retrieve permission="CREATE_TRANSLATION UPDATE_TRANSLATION DELETE_TRANSLATION" global_required="true"/>
7321                 <update permission="UPDATE_TRANSLATION" global_required="true"/>
7322                 <delete permission="DELETE_TRANSLATION" global_required="true"/>
7323             </actions>
7324         </permacrud>
7325         </class>
7326         <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">
7327                 <fields oils_persist:primary="id" oils_persist:sequence="config.idl_field_doc_id_seq">
7328                         <field name="id" reporter:datatype="id" />
7329                         <field name="fm_class" reporter:datatype="text"/>
7330                         <field name="field" reporter:datatype="text"/>
7331                         <field name="owner" reporter:datatype="org_unit"/>
7332                         <field name="string" reporter:datatype="text" oils_persist:i18n="true"/>
7333                 </fields>
7334                 <links>
7335                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7336                 </links>
7337         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7338             <actions>
7339                 <create   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7340                 <retrieve/>
7341                 <update   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7342                 <delete   permission="ADMIN_FIELD_DOC" context_field="owner"/>
7343             </actions>
7344         </permacrud>
7345         </class>
7346         <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">
7347                 <fields oils_persist:primary="code">
7348                         <field name="code" reporter:datatype="id" />
7349                         <field name="marc_code" reporter:datatype="text"/>
7350                         <field name="name" reporter:datatype="text" oils_persist:i18n="true"/>
7351                         <field name="description" reporter:datatype="text" oils_persist:i18n="true"/>
7352                 </fields>
7353                 <links/>
7354         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7355             <actions>
7356                 <create permission="CREATE_LOCALE" global_required="true"/>
7357                 <retrieve/>
7358                 <update permission="UPDATE_LOCALE" global_required="true"/>
7359                 <delete permission="DELETE_LOCALE" global_required="true"/>
7360             </actions>
7361         </permacrud>
7362         </class>
7363         <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">
7364                 <fields oils_persist:primary="id" oils_persist:sequence="config.billing_type_id_seq">
7365                         <field name="id" reporter:datatype="id" reporter:label="ID" reporter:selector="name"/>
7366                         <field name="name" reporter:datatype="text" reporter:label="Name" oils_persist:i18n="true"/>
7367                         <field name="owner" reporter:datatype="org_unit" reporter:label="Org Unit" />
7368             <field name="default_price" reporter:datatype="money" reporter:label="Default Price"/>
7369                 </fields>
7370                 <links>
7371                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7372                 </links>
7373         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7374             <actions>
7375                 <create permission="CREATE_BILLING_TYPE" context_field="owner"/>
7376                 <retrieve permission="VIEW_BILLING_TYPE CREATE_BILLING_TYPE UPDATE_BILLING_TYPE DELETE_BILLING_TYPE" context_field="owner"/>
7377                 <update permission="UPDATE_BILLING_TYPE" context_field="owner"/>
7378                 <delete permission="DELETE_BILLING_TYPE" context_field="owner"/>
7379             </actions>
7380         </permacrud>
7381         </class>
7382
7383         <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">
7384                 <fields oils_persist:primary="id">
7385                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7386                         <field reporter:label="Type Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7387                 </fields>
7388                 <links/>
7389         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7390             <actions>
7391                 <create permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7392                 <retrieve/>
7393                 <update permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7394                 <delete permission="ADMIN_USER_REQUEST_TYPE" global_required="true"/>
7395             </actions>
7396         </permacrud>
7397         </class>
7398
7399         <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">
7400                 <fields oils_persist:primary="id" oils_persist:sequence="acq.user_request_id_seq">
7401                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
7402                         <field reporter:label="User" name="usr" reporter:datatype="link" />
7403                         <field reporter:label="Request Type" name="request_type" oils_obj:required="true" reporter:datatype="link" />
7404                         <field reporter:label="Place Hold" name="hold" reporter:datatype="bool" />
7405                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="link" />
7406                         <field reporter:label="Holdable Formats" name="holdable_formats" reporter:datatype="text" />
7407                         <field reporter:label="Phone Notify" name="phone_notify" reporter:datatype="text" />
7408                         <field reporter:label="Email Notify" name="email_notify" reporter:datatype="bool" />
7409                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
7410                         <field reporter:label="Bib Record" name="eg_bib" reporter:datatype="link" />
7411                         <field reporter:label="Request Date/Time" name="request_date" reporter:datatype="timestamp" />
7412                         <field reporter:label="Need Before Date/Time" name="need_before" reporter:datatype="timestamp" />
7413                         <field reporter:label="Max Acceptable Fee" name="max_fee" reporter:datatype="text" />
7414                         <field reporter:label="ISxN" name="isxn" reporter:datatype="text" />
7415                         <field reporter:label="Title" name="title" reporter:datatype="text" />
7416                         <field reporter:label="Volume" name="volume" reporter:datatype="text" />
7417                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7418                         <field reporter:label="Article Title" name="article_title" reporter:datatype="text" />
7419                         <field reporter:label="Article Pages" name="article_pages" reporter:datatype="text" />
7420                         <field reporter:label="Publisher" name="publisher" reporter:datatype="text" />
7421                         <field reporter:label="Publication Location" name="location" reporter:datatype="text" />
7422                         <field reporter:label="Publication Date" name="pubdate" reporter:datatype="text" />
7423                         <field reporter:label="Mentioned In" name="mentioned" reporter:datatype="text" />
7424                         <field reporter:label="Other Info" name="other_info" reporter:datatype="text" />
7425                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
7426                 </fields>
7427                 <links>
7428                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
7429                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
7430                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7431                         <link field="eg_bib" reltype="has_a" key="id" map="" class="bre"/>
7432                         <link field="request_type" reltype="has_a" key="id" map="" class="aurt"/>
7433                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
7434                 </links>
7435         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7436             <actions>
7437                 <create permission="user_request.create">
7438                     <context link="usr" field="home_ou"/>
7439                                 </create>
7440                 <retrieve permission="user_request.view">
7441                     <context link="usr" field="home_ou"/>
7442                                 </retrieve>
7443                 <update permission="user_request.update">
7444                     <context link="usr" field="home_ou"/>
7445                                 </update>
7446                 <delete permission="user_request.delete">
7447                     <context link="usr" field="home_ou"/>
7448                                 </delete>
7449             </actions>
7450         </permacrud>
7451         </class>
7452
7453         <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">
7454                 <fields oils_persist:primary="code">
7455                         <field reporter:label="Currency Code" name="code" reporter:datatype="text" reporter:selector='label'/>
7456                         <field reporter:label="Currency Label" name="label" reporter:datatype="text" oils_persist:i18n="true" />
7457                 </fields>
7458                 <links/>
7459         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7460             <actions>
7461                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7462                 <retrieve/>
7463                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7464                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7465             </actions>
7466         </permacrud>
7467         </class>
7468
7469         <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">
7470                 <fields oils_persist:primary="id" oils_persist:sequence="acq.exchange_rate_id_seq">
7471                         <field reporter:label="Exchange Rate ID" name="id" reporter:datatype="id" />
7472                         <field reporter:label="From Currency" name="from_currency" reporter:datatype="link" />
7473                         <field reporter:label="To Currency" name="to_currency" reporter:datatype="link" />
7474                         <field reporter:label="Ratio" name="ratio" />
7475                 </fields>
7476                 <links>
7477                         <link field="from_currency" reltype="has_a" key="code" map="" class="acqct"/>
7478                         <link field="to_currency" 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                                 <create permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7483                                 <retrieve/>
7484                                 <update permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7485                                 <delete permission="ADMIN_CURRENCY_TYPE" global_required="true"/>
7486                         </actions>
7487                 </permacrud>
7488         </class>
7489
7490         <class id="acqpro" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::provider" oils_persist:tablename="acq.provider" reporter:label="Provider">
7491                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_id_seq">
7492                         <field reporter:label="Provider ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7493                         <field reporter:label="Provider Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7494                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7495                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7496                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7497                         <field reporter:label="Holdings Tag" name="holding_tag" reporter:datatype="text" />
7498                         <field reporter:label="Addresses" name="addresses" oils_persist:virtual="true" reporter:datatype="link" />
7499                         <field reporter:label="SAN" name="san" reporter:datatype="text" />
7500                         <field reporter:label="EDI Default" name="edi_default" reporter:datatype="link" />
7501                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7502                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
7503                         <field reporter:label="URL" name="url" reporter:datatype="text" />
7504                         <field reporter:label="Email" name="email" reporter:datatype="text" />
7505                         <field reporter:label="Phone" name="phone" reporter:datatype="text" />
7506                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text" />
7507                         <field reporter:label="Default Claim Policy" name="default_claim_policy" reporter:datatype="link" />
7508                         <field reporter:label="Default # Copies" name="default_copy_count" reporter:datatype="int" />
7509                 </fields>
7510                 <links>
7511                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7512                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7513             <link field="addresses" reltype="has_many" map="" key="provider" class="acqpa"/>
7514             <link field="edi_default" reltype="has_a" map="" key="id" class="acqedi"/>
7515             <link field="default_claim_policy" reltype="has_a" map="" key="id" class="acqclp"/>
7516                 </links>
7517         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7518             <actions>
7519                 <create   permission="ADMIN_PROVIDER" context_field="owner"/>
7520                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER" context_field="owner"/>
7521                 <update   permission="ADMIN_PROVIDER" context_field="owner"/>
7522                 <delete   permission="ADMIN_PROVIDER" context_field="owner"/>
7523             </actions>
7524         </permacrud>
7525         </class>
7526
7527         <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">
7528                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_note_id_seq">
7529                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
7530                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
7531                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
7532                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
7533                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
7534                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
7535                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
7536                 </fields>
7537                 <links>
7538                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
7539                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
7540                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7541                 </links>
7542         </class>
7543
7544         <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">
7545                 <fields oils_persist:primary="code">
7546                         <field reporter:label="Code" name="code" reporter:datatype="id" reporter:selector="name"/>
7547                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7548                 </fields>
7549                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7550             <actions>
7551                 <create permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7552                 <retrieve/>
7553                 <update permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7554                 <delete permission="ADMIN_INVOICE_PAYMENT_METHOD" global_required="true"/>
7555             </actions>
7556                 </permacrud>
7557         </class>
7558
7559         <class id="acqinv" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::invoice" oils_persist:tablename="acq.invoice" reporter:label="Invoice">
7560                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_id_seq">
7561                         <field reporter:label="Internal Invoice ID" name="id" reporter:datatype="id"/>
7562                         <field reporter:label="Receiver" name="receiver" reporter:datatype="org_unit" />
7563                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7564                         <field reporter:label="Shipper" name="shipper" reporter:datatype="link"/>
7565                         <field reporter:label="Invoice Date" name="recv_date" reporter:datatype="timestamp" />
7566                         <field reporter:label="Receive Method" name="recv_method" reporter:datatype="link" />
7567                         <field reporter:label="Invoice Type" name="inv_type" reporter:datatype="text" />
7568                         <field reporter:label="Vendor Invoice ID" name="inv_ident" reporter:datatype="text" />
7569                         <field reporter:label="Payment Auth" name="payment_auth" reporter:datatype="text" />
7570                         <field reporter:label="Payment Method" name="payment_method" reporter:datatype="link" />
7571                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7572                         <field reporter:label="Complete" name="complete" reporter:datatype="bool" />
7573                         <field reporter:label="Invoice Entries" name="entries" reporter:datatype="link" oils_persist:virtual="true"/>
7574                         <field reporter:label="Invoice Items" name="items" reporter:datatype="link" oils_persist:virtual="true"/>
7575                 </fields>
7576                 <links>
7577                         <link field="receiver" reltype="has_a" key="id" map="" class="aou"/>
7578                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7579                         <link field="shipper" reltype="has_a" key="id" map="" class="acqpro"/>
7580                         <link field="recv_method" reltype="has_a" key="code" map="" class="acqim"/>
7581                         <link field="payment_method" reltype="has_a" key="code" map="" class="acqipm"/>
7582                         <link field="entries" reltype="has_many" key="invoice" map="" class="acqie"/>
7583                         <link field="items" reltype="has_many" key="invoice" map="" class="acqii"/>
7584                 </links>
7585         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7586             <actions>
7587                 <create   permission="CREATE_INVOICE" context_field="receiver"/>
7588                 <retrieve permission="CREATE_INVOICE VIEW_INVOICE" context_field="receiver"/>
7589                 <update   permission="CREATE_INVOICE" context_field="receiver"/>
7590                 <delete   permission="CREATE_INVOICE" context_field="receiver"/>
7591             </actions>
7592         </permacrud>
7593         </class>
7594
7595         <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">
7596                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_entry_id_seq">
7597                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7598                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7599                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7600                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link"/>
7601                         <field reporter:label="Invoice Item Count" name="inv_item_count" reporter:datatype="int" />
7602                         <field reporter:label="Physical Item Count" name="phys_item_count" reporter:datatype="int" />
7603                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7604                         <field reporter:label="Billed Cost per Item" name="billed_per_item" reporter:datatype="bool" />
7605                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7606                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7607                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7608                 </fields>
7609                 <links>
7610                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7611                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7612                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
7613                 </links>
7614         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7615             <actions>
7616                 <create   permission="ADMIN_INVOICE">
7617                                         <context link="invoice" field="receiver"/>
7618                                 </create>
7619                 <retrieve permission="ADMIN_INVOICE">
7620                                         <context link="invoice" field="receiver"/>
7621                                 </retrieve>
7622                 <update   permission="ADMIN_INVOICE">
7623                                         <context link="invoice" field="receiver"/>
7624                                 </update>
7625                                 <delete   permission="ADMIN_INVOICE">
7626                                         <context link="invoice" field="receiver"/>
7627                                 </delete>
7628             </actions>
7629         </permacrud>
7630         </class>
7631
7632         <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">
7633                 <fields oils_persist:primary="id" oils_persist:sequence="acq.invoice_item_id_seq">
7634                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7635                         <field reporter:label="Invoice" name="invoice" reporter:datatype="link" />
7636                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
7637                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
7638                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link" />
7639                         <field reporter:label="Title or Item Name" name="title" reporter:datatype="text" />
7640                         <field reporter:label="Author" name="author" reporter:datatype="text" />
7641                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7642                         <field reporter:label="Cost Billed" name="cost_billed" reporter:datatype="money" />
7643                         <field reporter:label="Actual Cost" name="actual_cost" reporter:datatype="money" />
7644                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
7645                         <field reporter:label="Amount Paid" name="amount_paid" reporter:datatype="money" />
7646                         <field reporter:label="Purchase Order Item" name="po_item" reporter:datatype="link" />
7647                         <field reporter:label="Target" name="target" reporter:datatype="int" />
7648                 </fields>
7649                 <links>
7650                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv"/>
7651                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
7652                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
7653                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
7654                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7655                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi"/>
7656                 </links>
7657         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7658             <actions>
7659                 <create   permission="ADMIN_INVOICE">
7660                                         <context link="invoice" field="receiver"/>
7661                                 </create>
7662                 <retrieve permission="ADMIN_INVOICE">
7663                                         <context link="invoice" field="receiver"/>
7664                                 </retrieve>
7665                 <update   permission="ADMIN_INVOICE">
7666                                         <context link="invoice" field="receiver"/>
7667                                 </update>
7668                                 <delete   permission="ADMIN_INVOICE">
7669                                         <context link="invoice" field="receiver"/>
7670                                 </delete>
7671             </actions>
7672         </permacrud>
7673         </class>
7674
7675         <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">
7676                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_address_id_seq">
7677                         <field reporter:label="Address Type" name="address_type"  reporter:datatype="text"/>
7678                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7679                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7680                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7681                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7682                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7683                         <field reporter:label="Post Code" name="post_code"  reporter:datatype="text"/>
7684                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7685                         <field reporter:label="Street 1" name="street1"  reporter:datatype="text"/>
7686                         <field reporter:label="Street 2" name="street2"  reporter:datatype="text"/>
7687                         <field reporter:label="Is Valid?" name="valid" reporter:datatype="bool"/>
7688                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7689                 </fields>
7690                 <links>
7691                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7692                 </links>
7693         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7694             <actions>
7695                 <create permission="ADMIN_PROVIDER">
7696                     <context link="provider" field="owner"/>
7697                 </create>
7698                 <retrieve permission="ADMIN_PROVIDER">
7699                     <context link="provider" field="owner"/>
7700                 </retrieve>
7701                 <update permission="ADMIN_PROVIDER">
7702                     <context link="provider" field="owner"/>
7703                 </update>
7704                 <delete permission="ADMIN_PROVIDER">
7705                     <context link="provider" field="owner"/>
7706                 </delete>
7707             </actions>
7708         </permacrud>
7709         </class>
7710
7711         <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">
7712                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_id_seq">
7713                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
7714                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
7715                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
7716                         <field reporter:label="Role" name="role" reporter:datatype="text"/>
7717                         <field reporter:label="Email" name="email" reporter:datatype="text"/>
7718                         <field reporter:label="Phone" name="phone" reporter:datatype="text"/>
7719         </fields>
7720                 <links>
7721                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
7722                 </links>
7723         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7724             <actions>
7725                 <create permission="ADMIN_PROVIDER">
7726                     <context link="provider" field="owner"/>
7727                 </create>
7728                 <retrieve permission="ADMIN_PROVIDER">
7729                     <context link="provider" field="owner"/>
7730                 </retrieve>
7731                 <update permission="ADMIN_PROVIDER">
7732                     <context link="provider" field="owner"/>
7733                 </update>
7734                 <delete permission="ADMIN_PROVIDER">
7735                     <context link="provider" field="owner"/>
7736                 </delete>
7737             </actions>
7738         </permacrud>
7739     </class>
7740         <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">
7741                 <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_contact_address_id_seq">
7742                         <field reporter:label="Type" name="address_type"  reporter:datatype="text"/>
7743                         <field reporter:label="City" name="city"  reporter:datatype="text"/>
7744                         <field reporter:label="Country" name="country"  reporter:datatype="text"/>
7745                         <field reporter:label="County" name="county"  reporter:datatype="text"/>
7746                         <field reporter:label="Address ID" name="id" reporter:datatype="id" />
7747                         <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
7748                         <field reporter:label="State" name="state"  reporter:datatype="text"/>
7749                         <field reporter:label="Street (1)" name="street1"  reporter:datatype="text"/>
7750                         <field reporter:label="Street (2)" name="street2"  reporter:datatype="text"/>
7751                         <field reporter:label="Contact" name="contact" reporter:datatype="link"/>
7752                         <field reporter:label="Valid Address?" name="valid" reporter:datatype="bool"/>
7753                         <field reporter:label="Fax Phone" name="fax_phone" reporter:datatype="text"/>
7754                 </fields>
7755                 <links>
7756                         <link field="contact" reltype="has_a" key="id" map="" class="acqpc"/>
7757                 </links>
7758         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7759             <actions>
7760                 <create permission="ADMIN_PROVIDER">
7761                     <context link="contact" jump='provider' field="owner"/>
7762                 </create>
7763                 <retrieve permission="ADMIN_PROVIDER">
7764                     <context link="contact" jump='provider' field="owner"/>
7765                 </retrieve>
7766                 <update permission="ADMIN_PROVIDER">
7767                     <context link="contact" jump='provider' field="owner"/>
7768                 </update>
7769                 <delete permission="ADMIN_PROVIDER">
7770                     <context link="contact" jump='provider' field="owner"/>
7771                 </delete>
7772             </actions>
7773         </permacrud>
7774         </class>
7775
7776         <class id="acqftr" controller="open-ils.cstore" oils_obj:fieldmapper="acq::fund_transfer" oils_persist:tablename="acq.fund_transfer" reporter:label="Fund Transfer">
7777                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_transfer_id_seq">
7778                         <field reporter:label="Fund Transfer ID" name="id" reporter:datatype="id"/>
7779                         <field reporter:label="Source Fund" name="src_fund" reporter:datatype="link"/>
7780                         <field reporter:label="Source Amount" name="src_amount" reporter:datatype="money"/>
7781                         <field reporter:label="Destination Fund" name="dest_fund" reporter:datatype="link"/>
7782                         <field reporter:label="Destination Amount" name="dest_amount" reporter:datatype="money"/>
7783                         <field reporter:label="Transfer Time" name="transfer_time" reporter:datatype="timestamp"/>
7784                         <field reporter:label="Transfer User" name="transfer_user" reporter:datatype="link"/>
7785                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7786                         <field reporter:label="Funding Source Credit ID" name="funding_source_credit" reporter:datatype="link"/>
7787                 </fields>
7788                 <links>
7789                         <link field="src_fund" reltype="has_a" key="id" map="" class="acqf"/>
7790                         <link field="dest_fund" reltype="has_a" key="id" map="" class="acqf"/>
7791                         <link field="transfer_user" reltype="has_a" key="id" map="" class="au"/>
7792                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
7793                 </links>
7794         </class>
7795
7796         <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">
7797                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_calendar_id_seq">
7798                         <field reporter:label="Fiscal Calendar ID" name="id" reporter:datatype="id" reporter:selector='name'/>
7799                         <field reporter:label="Fiscal Calendar Name" name="name" reporter:datatype="text"/>
7800                         <field reporter:label="Years" name="years" oils_persist:virtual="true" reporter:datatype="link"/>
7801                 </fields>
7802                 <links>
7803             <link field="years" reltype="has_many" map="" key="calendar" class="acqfy"/>
7804                 </links>
7805                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7806                         <actions>
7807                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7808                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7809                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7810                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7811                         </actions>
7812                 </permacrud>
7813         </class>
7814
7815         <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">
7816                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fiscal_year_id_seq">
7817                         <field reporter:label="Fiscal Year ID" name="id" reporter:datatype="id" reporter:selector='year'/>
7818                         <field reporter:label="Calendar" name="calendar" reporter:datatype="link"/>
7819                         <field reporter:label="Fiscal Year" name="year" reporter:datatype="int"/>
7820                         <field reporter:label="Year Begin" name="year_begin" reporter:datatype="timestamp"/>
7821                         <field reporter:label="Year End" name="year_end" reporter:datatype="timestamp"/>
7822                 </fields>
7823                 <links>
7824                         <link field="calendar" reltype="has_a" key="id" map="" class="acqfc"/>
7825                 </links>
7826                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7827                         <actions>
7828                                 <create permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7829                                 <retrieve permission="STAFF_LOGIN" global_required="true"/>
7830                                 <update permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7831                                 <delete permission="ADMIN_ACQ_FISCAL_YEAR" global_required="true"/>
7832                         </actions>
7833                 </permacrud>
7834         </class>
7835
7836         <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">
7837                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_id_seq">
7838                         <field reporter:label="Funding Source ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7839                         <field reporter:label="Funding Source Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
7840                         <field reporter:label="Owner" name="owner" reporter:datatype="org_unit" />
7841                         <field reporter:label="Currency" name="currency_type" oils_persist:primitive="string" reporter:datatype="link" />
7842                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7843                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7844                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7845                         <field reporter:label="Credits" name="credits" oils_persist:virtual="true" reporter:datatype="link"/>
7846                         <field reporter:label="Fund Allocation Percentages" name="fund_alloc_pcts" oils_persist:virtual="true" reporter:datatype="link"/>
7847                 </fields>
7848                 <links>
7849                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7850                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
7851             <link field="allocations" reltype="has_many" map="" key="funding_source" class="acqfa"/>
7852             <link field="credits" reltype="has_many" key="funding_source" map="" class="acqfscred"/>
7853                         <link field="fund_alloc_pcts" reltype="has_many" key="funding_source" map="" class="acqfap"/>
7854                 </links>
7855         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7856             <actions>
7857                 <create   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7858                 <retrieve permission="ADMIN_FUNDING_SOURCE MANAGE_FUNDING_SOURCE VIEW_FUNDING_SOURCE" context_field="owner"/>
7859                 <update   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7860                 <delete   permission="ADMIN_FUNDING_SOURCE" context_field="owner"/>
7861             </actions>
7862         </permacrud>
7863         </class>
7864
7865         <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">
7866                 <fields oils_persist:primary="id" oils_persist:sequence="acq.funding_source_credit_id_seq">
7867                         <field reporter:label="Credit ID" name="id" reporter:datatype="id" />
7868                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link" />
7869                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7870                         <field reporter:label="Note" name="note" reporter:datatype="text" />
7871                         <field reporter:label="Deadline Date" name="deadline_date" reporter:datatype="timestamp" />
7872                         <field reporter:label="Effective Date" name="effective_date" reporter:datatype="timestamp" />
7873                 </fields>
7874                 <links>
7875                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7876                 </links>
7877                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7878                         <actions>
7879                                 <create permission="ADMIN_FUNDING_SOURCE">
7880                     <context link="funding_source" field="owner"/>
7881                 </create>
7882                                 <retrieve permission="ADMIN_FUNDING_SOURCE">
7883                     <context link="funding_source" field="owner"/>
7884                 </retrieve>
7885                                 <update permission="ADMIN_FUNDING_SOURCE">
7886                     <context link="funding_source" field="owner"/>
7887                 </update>
7888                                 <delete permission="ADMIN_FUNDING_SOURCE">
7889                     <context link="funding_source" field="owner"/>
7890                 </delete>
7891                         </actions>
7892                 </permacrud>
7893         </class>
7894
7895         <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">
7896                 <fields oils_persist:primary="id">
7897                         <field reporter:label="Ordered Fund Src ID" name="id" reporter:datatype="id"/>
7898                         <field reporter:label="Sort Priority" name="sort_priority" reporter:datatype="int"/>
7899                         <field reporter:label="Sort Date" name="sort_date" reporter:datatype="timestamp"/>
7900                         <field reporter:label="Funding Source ID" name="funding_source" reporter:datatype="link"/>
7901                         <field reporter:label="Amount" name="amount" reporter:datatype="money"/>
7902                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
7903                 </fields>
7904                 <links>
7905                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
7906                 </links>
7907         </class>
7908
7909         <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">
7910                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_debit_id_seq">
7911                         <field reporter:label="Debit ID" name="id" reporter:datatype="id" />
7912                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7913                         <field reporter:label="Origin Amount" name="origin_amount" reporter:datatype="money" />
7914                         <field reporter:label="Origin Currency" name="origin_currency_type" reporter:datatype="link" />
7915                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
7916                         <field reporter:label="Encumbrance" name="encumbrance" reporter:datatype="bool" />
7917                         <field reporter:label="Debit Type" name="debit_type" reporter:datatype="text" />
7918                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
7919                 </fields>
7920                 <links>
7921                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7922                         <link field="origin_currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7923                 </links>
7924                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7925                         <actions>
7926                                 <create permission="ADMIN_ACQ_FUND">
7927                     <context link="fund" field="org"/>
7928                 </create>
7929                                 <retrieve permission="ADMIN_ACQ_FUND">
7930                     <context link="fund" field="org"/>
7931                 </retrieve>
7932                                 <update permission="ADMIN_ACQ_FUND">
7933                     <context link="fund" field="org"/>
7934                 </update>
7935                                 <delete permission="ADMIN_ACQ_FUND">
7936                     <context link="fund" field="org"/>
7937                 </delete>
7938                         </actions>
7939                 </permacrud>
7940         </class>
7941
7942         <class id="acqf" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::fund" oils_persist:tablename="acq.fund" reporter:label="Fund">
7943                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
7944                         <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
7945                         <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
7946                         <field reporter:label="Name" name="name" reporter:datatype="text" />
7947                         <field reporter:label="Year" name="year" reporter:datatype="int" />
7948                         <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
7949                         <field reporter:label="Code" name="code" reporter:datatype="text" />
7950                         <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
7951                         <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
7952                         <field reporter:label="Active" name="active" reporter:datatype="bool" />
7953                         <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
7954                         <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
7955                         <field reporter:label="Summary" name="summary" oils_persist:virtual="true"/>
7956                         <field reporter:label="Allocations" name="allocations" oils_persist:virtual="true" reporter:datatype="link"/>
7957                         <field reporter:label="Debits" name="debits" oils_persist:virtual="true" reporter:datatype="link"/>
7958                         <field reporter:label="Tags" name="tags" oils_persist:virtual="true" reporter:datatype="link"/>
7959                         <field reporter:label="Allocation Total" name="allocation_total" oils_persist:virtual="true" reporter:datatype="link"/>
7960                         <field reporter:label="Debit Total" name="debit_total" oils_persist:virtual="true" reporter:datatype="link"/>
7961                         <field reporter:label="Encumbrance Total" name="encumbrance_total" oils_persist:virtual="true" reporter:datatype="link"/>
7962                         <field reporter:label="Spent Total" name="spent_total" oils_persist:virtual="true" reporter:datatype="link"/>
7963                         <field reporter:label="Combined Balance" name="combined_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7964                         <field reporter:label="Spent Balance" name="spent_balance" oils_persist:virtual="true" reporter:datatype="link"/>
7965                 </fields>
7966                 <links>
7967                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
7968                         <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
7969             <link field="allocations" reltype="has_many" key="fund" map="" class="acqfa"/>
7970             <link field="debits" reltype="has_many" key="fund" map="" class="acqfdeb"/>
7971             <link field="tags" reltype="has_many" key="fund" map="" class="acqftm"/>
7972             <link field="allocation_total" reltype="might_have" key="fund" map="" class="acqfat"/>
7973             <link field="debit_total" reltype="might_have" key="fund" map="" class="acqfdt"/>
7974             <link field="encumbrance_total" reltype="might_have" key="fund" map="" class="acqfet"/>
7975             <link field="spent_total" reltype="might_have" key="fund" map="" class="acqfst"/>
7976             <link field="combined_balance" reltype="might_have" key="fund" map="" class="acqfcb"/>
7977             <link field="spent_balance" reltype="might_have" key="fund" map="" class="acqfsb"/>
7978                 </links>
7979         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1" ignore_object_perms="true">
7980             <actions>
7981                 <create permission="ADMIN_ACQ_FUND" context_field="org"/>
7982                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
7983                 <update permission="ADMIN_ACQ_FUND" context_field="org"/>
7984                 <delete permission="ADMIN_ACQ_FUND" context_field="org"/>
7985             </actions>
7986         </permacrud>
7987         </class>
7988
7989         <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">
7990                 <fields oils_persist:primary="fund">
7991                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
7992                         <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
7993                 </fields>
7994                 <links>
7995                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
7996                 </links>
7997         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
7998             <actions>
7999                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8000                                         <context link="fund" field="org" />
8001                 </retrieve>
8002             </actions>
8003         </permacrud>
8004         </class>
8005
8006         <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">
8007                 <fields oils_persist:primary="fund">
8008                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8009                         <field reporter:label="Total Debit Amount" name="amount" reporter:datatype="money" />
8010                 </fields>
8011                 <links>
8012                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8013                 </links>
8014         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8015             <actions>
8016                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8017                                         <context link="fund" field="org" />
8018                 </retrieve>
8019             </actions>
8020         </permacrud>
8021         </class>
8022
8023         <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">
8024                 <fields oils_persist:primary="fund">
8025                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8026                         <field reporter:label="Total Encumbrance Amount" name="amount" reporter:datatype="money" />
8027                 </fields>
8028                 <links>
8029                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8030                 </links>
8031         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8032             <actions>
8033                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8034                                         <context link="fund" field="org" />
8035                 </retrieve>
8036             </actions>
8037         </permacrud>
8038         </class>
8039
8040         <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">
8041                 <fields oils_persist:primary="fund">
8042                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8043                         <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8044                 </fields>
8045                 <links>
8046                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8047                 </links>
8048         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8049             <actions>
8050                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8051                                         <context link="fund" field="org" />
8052                 </retrieve>
8053             </actions>
8054         </permacrud>
8055         </class>
8056
8057         <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">
8058                 <fields oils_persist:primary="fund">
8059                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8060                         <field reporter:label="Balance after Spent and Encumbered" name="amount" reporter:datatype="money" />
8061                 </fields>
8062                 <links>
8063                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8064                 </links>
8065         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8066             <actions>
8067                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8068                                         <context link="fund" field="org" />
8069                 </retrieve>
8070             </actions>
8071         </permacrud>
8072         </class>
8073
8074    <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">
8075         <fields oils_persist:primary="fund">
8076             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8077             <field reporter:label="Total Allocation Amount" name="amount" reporter:datatype="money" />
8078         </fields>
8079         <links>
8080             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8081         </links>
8082     </class>
8083
8084    <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">
8085         <fields oils_persist:primary="fund">
8086             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8087             <field reporter:label="Total Encumbered Amount" name="amount" reporter:datatype="money" />
8088         </fields>
8089         <links>
8090             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8091         </links>
8092     </class>
8093
8094    <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">
8095         <fields oils_persist:primary="fund">
8096             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8097             <field reporter:label="Total Spent Amount" name="amount" reporter:datatype="money" />
8098         </fields>
8099         <links>
8100             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8101         </links>
8102     </class>
8103
8104    <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">
8105         <fields oils_persist:primary="fund">
8106             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8107             <field reporter:label="Total Spent Balance" name="amount" reporter:datatype="money" />
8108         </fields>
8109         <links>
8110             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8111         </links>
8112     </class>
8113
8114    <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">
8115         <fields oils_persist:primary="fund">
8116             <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8117             <field reporter:label="Total Combined Balance" name="amount" reporter:datatype="money" />
8118         </fields>
8119         <links>
8120             <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8121         </links>
8122     </class>
8123
8124         <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">
8125                 <fields oils_persist:primary="funding_source">
8126                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8127                         <field reporter:label="Total Credits to Funding Source" name="amount" reporter:datatype="money" />
8128                 </fields>
8129                 <links>
8130                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8131                 </links>
8132         </class>
8133
8134         <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">
8135                 <fields oils_persist:primary="funding_source">
8136                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8137                         <field reporter:label="Total Allocated from Funding Source" name="amount" reporter:datatype="money" />
8138                 </fields>
8139                 <links>
8140                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8141                 </links>
8142         </class>
8143
8144         <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">
8145                 <fields oils_persist:primary="funding_source">
8146                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8147                         <field reporter:label="Balance Remaining" name="amount" reporter:datatype="money" />
8148                 </fields>
8149                 <links>
8150                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8151                 </links>
8152         </class>
8153
8154         <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">
8155                 <fields oils_persist:primary="fund">
8156                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link" />
8157                         <field reporter:label="Balance after Spent" name="amount" reporter:datatype="money" />
8158                 </fields>
8159                 <links>
8160                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8161                 </links>
8162         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8163             <actions>
8164                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
8165                                         <context link="fund" field="org" />
8166                 </retrieve>
8167             </actions>
8168         </permacrud>
8169     </class>
8170     <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">
8171         <oils_persist:source_definition><![CDATA[
8172             SELECT
8173                 acqf.*,
8174                 COALESCE(acqfat.amount, 0.00) AS allocated_total,
8175                 COALESCE(acqfst.amount, 0.00) AS spent_total,
8176                 COALESCE(acqfet.amount, 0.00) AS encumbrance_total,
8177                 COALESCE(acqfcb.amount, 0.00) AS combined_balance
8178             FROM
8179                 acq.fund acqf
8180                 LEFT JOIN acq.fund_allocation_total acqfat ON (acqfat.fund = acqf.id)
8181                 LEFT JOIN acq.fund_spent_total acqfst ON (acqfst.fund = acqf.id)
8182                 LEFT JOIN acq.fund_encumbrance_total acqfet ON (acqfet.fund = acqf.id)
8183                 LEFT JOIN acq.fund_combined_balance acqfcb ON (acqfcb.fund = acqf.id)
8184         ]]></oils_persist:source_definition>
8185         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_id_seq">
8186             <field reporter:label="Fund ID" name="id" reporter:datatype="id" reporter:selector='code'/>
8187             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8188             <field reporter:label="Name" name="name" reporter:datatype="text" />
8189             <field reporter:label="Year" name="year" reporter:datatype="int" />
8190             <field reporter:label="Currency Type" name="currency_type" reporter:datatype="link" />
8191             <field reporter:label="Code" name="code" reporter:datatype="text" />
8192             <field reporter:label="Rollover" name="rollover" reporter:datatype="bool" />
8193             <field reporter:label="Propagate" name="propagate" reporter:datatype="bool" />
8194             <field reporter:label="Active" name="active" reporter:datatype="bool" />
8195             <field reporter:label="Balance Warning Percent" name="balance_warning_percent" reporter:datatype="int" />
8196             <field reporter:label="Balance Stop Percent" name="balance_stop_percent" reporter:datatype="int" />
8197
8198             <!-- non fund-native fields -->
8199             <field reporter:label="Total Allocated" name="allocated_total" reporter:datatype="money"/>
8200             <field reporter:label="Total Spent" name="spent_total" reporter:datatype="money"/>
8201             <field reporter:label="Total Encumbered" name="encumbrance_total" reporter:datatype="money"/>
8202             <field reporter:label="Remaining Balance" name="combined_balance" reporter:datatype="money"/>
8203         </fields>
8204         <links>
8205             <link field="id" reltype="has_a" key="id" map="" class="acqf"/>
8206             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8207             <link field="currency_type" reltype="has_a" key="code" map="" class="acqct"/>
8208         </links>
8209         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8210             <actions>
8211                 <retrieve permission="ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="org"/>
8212             </actions>
8213         </permacrud>
8214         </class>
8215         <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">
8216                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_id_seq">
8217                         <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8218                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8219                         <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8220                         <field reporter:label="Amount" name="amount" reporter:datatype="money" />
8221                         <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8222                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8223                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8224                 </fields>
8225                 <links>
8226                         <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8227                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8228                         <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8229                 </links>
8230                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8231                         <actions>
8232                                 <create permission="ADMIN_ACQ_FUND">
8233                     <context link="fund" field="org"/>
8234                 </create>
8235                                 <retrieve permission="ADMIN_ACQ_FUND">
8236                     <context link="fund" field="org"/>
8237                 </retrieve>
8238                                 <update permission="ADMIN_ACQ_FUND">
8239                     <context link="fund" field="org"/>
8240                 </update>
8241                                 <delete permission="ADMIN_ACQ_FUND">
8242                     <context link="fund" field="org"/>
8243                 </delete>
8244                         </actions>
8245                 </permacrud>
8246         </class>
8247
8248     <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">
8249         <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_allocation_percent_id_seq">
8250             <field reporter:label="Allocation ID" name="id" reporter:datatype="id" />
8251             <field reporter:label="Funding Source" name="funding_source" reporter:datatype="link" />
8252             <field reporter:label="Org Unit" name="org" reporter:datatype="org_unit" />
8253             <field reporter:label="Fund Code" name="fund_code" reporter:datatype="text" />
8254             <field reporter:label="Percent" name="percent" reporter:datatype="float" />
8255             <field reporter:label="Allocating User" name="allocator" reporter:datatype="link" />
8256             <field reporter:label="Note" name="note" reporter:datatype="text" />
8257             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp" />
8258         </fields>
8259         <links>
8260             <link field="allocator" reltype="has_a" key="id" map="" class="au"/>
8261             <link field="org" reltype="has_a" key="id" map="" class="aou"/>
8262             <link field="funding_source" reltype="has_a" key="id" map="" class="acqfs"/>
8263         </links>
8264                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8265                         <actions>
8266                                 <create permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8267                                 <retrieve permission="VIEW_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8268                                 <update permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8269                                 <delete permission="ADMIN_ACQ_FUND_ALLOCATION_PERCENT" global_required="true"/>
8270                         </actions>
8271                 </permacrud>
8272     </class>
8273
8274         <class id="acqpl" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::picklist" oils_persist:tablename="acq.picklist" reporter:label="Selection List">
8275                 <fields oils_persist:primary="id" oils_persist:sequence="acq.picklist_id_seq">
8276                         <field reporter:label="Selection List ID" name="id" reporter:datatype="id" reporter:selector='name' />
8277                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8278                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit" />
8279                         <field reporter:label="Name" name="name" reporter:datatype="text" oils_persist:i18n="true" />
8280                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8281                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8282                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link" />
8283                         <field reporter:label="Entry Count" name="entry_count" oils_persist:virtual="true"/>
8284                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8285                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8286                 </fields>
8287                 <links>
8288                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8289                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8290                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8291                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8292                         <link field="entries" reltype="has_many" key="picklist" map="" class="jub"/>
8293                 </links>
8294                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8295                         <actions>
8296                                 <retrieve permission="CREATE_PICKLIST VIEW_PICKLIST" context_field="org_unit"/>
8297                         </actions>
8298                 </permacrud>
8299         </class>
8300
8301         <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">
8302                 <fields oils_persist:primary="id" oils_persist:sequence="acq.cancel_reason_id_seq">
8303                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector='label'/>
8304                         <field reporter:label="Using Library" name="org_unit" reporter:datatype="org_unit"/>
8305                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
8306                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true"/>
8307                         <field reporter:label="Keep Debits?" name="keep_debits" reporter:datatype="bool"/>
8308                 </fields>
8309                 <links>
8310                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
8311                 </links>
8312                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8313                         <actions>
8314                                 <create permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8315                                 <retrieve permission="STAFF_LOGIN" context_field="org_unit"/>
8316                                 <update permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8317                                 <delete permission="ADMIN_ACQ_CANCEL_CAUSE" context_field="org_unit"/>
8318                         </actions>
8319                 </permacrud>
8320         </class>
8321
8322         <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">
8323                 <fields oils_persist:primary="id" oils_persist:sequence="acq.purchase_order_id_seq">
8324                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="id" reporter:selector='name'/>
8325                         <field reporter:label="Owner" name="owner" reporter:datatype="link" />
8326                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8327                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8328                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8329                         <field reporter:label="State" name="state" reporter:datatype="text" />
8330                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="org_unit" />
8331                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8332                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8333                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp" />
8334                         <field reporter:label="Name" name="name" reporter:datatype="text" />
8335                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8336                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8337                         <field reporter:label="Line Items" name="lineitems" oils_persist:virtual="true" reporter:datatype="link" />
8338                         <field reporter:label="Notes" name="notes" oils_persist:virtual="true" reporter:datatype="link" />
8339                         <field reporter:label="Line Item Count" name="lineitem_count" oils_persist:virtual="true" reporter:datatype="int" />
8340                         <field reporter:label="Amount Encumbered" name="amount_encumbered" oils_persist:virtual="true" reporter:datatype="float" />
8341                         <field reporter:label="Amount Spent" name="amount_spent" oils_persist:virtual="true" reporter:datatype="float" />
8342                         <field reporter:label="Amount Estimated" name="amount_estimated" oils_persist:virtual="true" reporter:datatype="float" />
8343                         <field reporter:label="PO Items" name="po_items" oils_persist:virtual="true" reporter:datatype="link" />
8344                 </fields>
8345                 <links>
8346                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8347                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8348                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8349                         <link field="default_fund" reltype="has_a" key="id" map="" class="acqf"/>
8350                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8351                         <link field="lineitems" reltype="has_many" key="purchase_order" map="" class="jub"/>
8352                         <link field="po_items" reltype="has_many" key="purchase_order" map="" class="acqpoi"/>
8353                         <link field="notes" reltype="has_many" key="purchase_order" map="" class="acqpon"/>
8354                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8355                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8356                 </links>
8357                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8358                         <actions>
8359                                 <create permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8360                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8361                                 <update permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8362                                 <delete permission="CREATE_PURCHASE_ORDER" context_field="ordering_agency"/>
8363                         </actions>
8364                 </permacrud>
8365         </class>
8366
8367         <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">
8368                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_purchase_order_pkey_seq">
8369                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8370                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8371                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8372                         <field reporter:label="Purchase Order ID" name="id" reporter:datatype="link"/>
8373                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
8374                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8375                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8376                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
8377                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8378                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8379                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8380                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8381                         <field reporter:label="Order Date" name="order_date" reporter:datatype="timestamp"/>
8382                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
8383                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8384                         <field reporter:label="Prepayment Required" name="prepayment_required" reporter:datatype="bool" />
8385                 </fields>
8386                 <links>
8387                         <link field="id" reltype="has_a" key="id" map="" class="acqpo"/>
8388                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8389                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8390                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8391                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
8392                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8393                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8394                 </links>
8395                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8396             <actions>
8397                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER" context_field="ordering_agency"/>
8398             </actions>
8399                 </permacrud>
8400         </class>
8401
8402         <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">
8403                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_note_id_seq">
8404                         <field reporter:label="PO Note ID" name="id" reporter:datatype="id" />
8405                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8406                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8407                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8408                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8409                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8410                         <field reporter:label="Vote Value" name="value" reporter:datatype="text" />
8411                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8412                 </fields>
8413                 <links>
8414                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8415                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8416                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8417                 </links>
8418                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8419             <actions>
8420                 <create permission="CREATE_PURCHASE_ORDER">
8421                     <context link="purchase_order" field="ordering_agency"/>
8422                 </create>
8423                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8424                     <context link="purchase_order" field="ordering_agency"/>
8425                 </retrieve>
8426                 <update permission="CREATE_PURCHASE_ORDER">
8427                     <context link="purchase_order" field="ordering_agency"/>
8428                 </update>
8429                 <delete permission="CREATE_PURCHASE_ORDER">
8430                     <context link="purchase_order" field="ordering_agency"/>
8431                 </delete>
8432             </actions>
8433                 </permacrud>
8434         </class>
8435
8436         <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">
8437                 <fields oils_persist:primary="id" oils_persist:sequence="acq.po_item_id_seq">
8438                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
8439                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8440                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
8441                         <field reporter:label="Invoice Item Type" name="inv_item_type" reporter:datatype="link"/>
8442                         <field reporter:label="Title" name="title" reporter:datatype="text"/>
8443                         <field reporter:label="Author" name="author" reporter:datatype="text"/>
8444                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
8445                         <field reporter:label="Estimated Cost" name="estimated_cost" reporter:datatype="money"/>
8446                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
8447                         <field reporter:label="Target" name="target" reporter:datatype="int" />
8448                 </fields>
8449                 <links>
8450                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8451                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8452                         <link field="inv_item_type" reltype="has_a" key="code" map="" class="aiit"/>
8453                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8454                 </links>
8455                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8456             <actions>
8457                 <create permission="CREATE_PURCHASE_ORDER">
8458                     <context link="purchase_order" field="ordering_agency"/>
8459                 </create>
8460                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8461                     <context link="purchase_order" field="ordering_agency"/>
8462                 </retrieve>
8463                 <update permission="CREATE_PURCHASE_ORDER">
8464                     <context link="purchase_order" field="ordering_agency"/>
8465                 </update>
8466                 <delete permission="CREATE_PURCHASE_ORDER">
8467                     <context link="purchase_order" field="ordering_agency"/>
8468                 </delete>
8469             </actions>
8470                 </permacrud>
8471         </class>
8472
8473         <class id="jub" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="acq::lineitem" oils_persist:tablename="acq.lineitem" reporter:label="Line Item">
8474                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_id_seq">
8475                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="id" />
8476                         <field reporter:label="Selecting User" name="selector" reporter:datatype="link" />
8477                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link" />
8478                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link" />
8479                         <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8480                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8481                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8482                         <field reporter:label="MARC" name="marc" reporter:datatype="text" />
8483                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link" />
8484                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text" />
8485                         <field reporter:label="Expected Receive Date" name="expected_recv_time" reporter:datatype="timestamp" />
8486                         <field reporter:label="State" name="state" reporter:datatype="text" />
8487                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8488                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8489                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link" />
8490                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8491                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8492                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8493                         <field reporter:label="Item Count" name="item_count" oils_persist:virtual="true" reporter:datatype="int" />
8494                         <field reporter:label="Descriptive Attributes" name="attributes" oils_persist:virtual="true" reporter:datatype="link" />
8495                         <field reporter:label="Line Item Details" name="lineitem_details" oils_persist:virtual="true" reporter:datatype="link" />
8496                         <field reporter:label="Line Item Notes" name="lineitem_notes" oils_persist:virtual="true" reporter:datatype="link" />
8497                         <field reporter:label="Distribution Formulas" name="distribution_formulas" oils_persist:virtual="true" reporter:datatype="link" />
8498                         <field reporter:label="Invoice Entries" name="invoice_entries" oils_persist:virtual="true" reporter:datatype="link" />
8499                         <field reporter:label="Order Summary" name="order_summary" oils_persist:virtual="true" reporter:datatype="link" />
8500                 </fields>
8501                 <links>
8502                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8503                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8504                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8505                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8506                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8507                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8508                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8509                         <link field="attributes" reltype="has_many" key="lineitem" map="" class="acqlia"/>
8510                         <link field="lineitem_details" reltype="has_many" key="lineitem" map="" class="acqlid"/>
8511                         <link field="lineitem_notes" reltype="has_many" key="lineitem" map="" class="acqlin"/>
8512                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8513                         <link field="distribution_formulas" reltype="has_many" key="lineitem" map="" class="acqdfa"/>
8514                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8515                         <link field="invoice_entries" reltype="has_many" key="lineitem" map="" class="acqie"/>
8516                         <link field="order_summary" reltype="might_have" key="lineitem" map="" class="acqlisum"/>
8517                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8518                 </links>
8519                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8520                         <actions>
8521                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER CREATE_PICKLIST VIEW_PICKLIST">
8522                                         <context link="purchase_order" field="ordering_agency"/>
8523                                         <context link="picklist" field="org_unit"/>
8524                                 </retrieve>
8525                         </actions>
8526                 </permacrud>
8527         </class>
8528
8529         <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">
8530                 <fields oils_persist:primary="audit_id" oils_persist:sequence="acq.acq_lineitem_pkey_seq">
8531                         <field reporter:label="Audit ID" name="audit_id" reporter:datatype="id"/>
8532                         <field reporter:label="Audit Time" name="audit_time" reporter:datatype="timestamp"/>
8533                         <field reporter:label="Audit Action" name="audit_action" reporter:datatype="text"/>
8534                         <field reporter:label="Lineitem ID" name="id" reporter:datatype="link"/>
8535                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
8536                         <field reporter:label="Editor" name="editor" reporter:datatype="link"/>
8537                         <field reporter:label="Selector" name="selector" reporter:datatype="link"/>
8538                         <field reporter:label="Provider" name="provider" reporter:datatype="link"/>
8539                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
8540                         <field reporter:label="Selection List" name="picklist" reporter:datatype="link"/>
8541                         <field reporter:label="Expected Receive Time" name="expected_recv_time" reporter:datatype="timestamp"/>
8542                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
8543                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp"/>
8544                         <field reporter:label="MARC" name="marc" reporter:datatype="text"/>
8545                         <field reporter:label="Evergreen Bib ID" name="eg_bib_id" reporter:datatype="link"/>
8546                         <field reporter:label="Source Label" name="source_label" reporter:datatype="text"/>
8547                         <field reporter:label="State" name="state" reporter:datatype="text"/>
8548                         <field reporter:label="Claim Policy" name="claim_policy" reporter:datatype="link"/>
8549                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link"/>
8550                         <field reporter:label="Estimated Unit Price" name="estimated_unit_price" reporter:datatype="money" />
8551                         <field reporter:label="Queued Vandelay Record" name="queued_record" reporter:datatype="link" />
8552                 </fields>
8553                 <links>
8554                         <link field="id" reltype="has_a" key="id" map="" class="jub"/>
8555                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8556                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8557                         <link field="selector" reltype="has_a" key="id" map="" class="au"/>
8558                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8559                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8560                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl"/>
8561                         <link field="eg_bib_id" reltype="has_a" key="id" map="" class="bre"/>
8562                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8563                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
8564                         <link field="queued_record" reltype="has_a" key="id" map="" class="vqbr"/>
8565                 </links>
8566                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8567                         <actions>
8568                                 <retrieve permission="CREATE_PURCHASE_ORDER VIEW_PURCHASE_ORDER">
8569                                         <context link="purchase_order" field="ordering_agency"/>
8570                                         <context link="picklist" field="org_unit"/>
8571                                 </retrieve>
8572                         </actions>
8573                 </permacrud>
8574         </class>
8575
8576         <class id="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">
8577                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_alert_text_id_seq">
8578                         <field reporter:label="Alert Text ID" name="id" reporter:datatype="id"/>
8579                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
8580                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
8581                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
8582                 </fields>
8583                 <links>
8584                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8585                 </links>
8586                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8587                         <actions>
8588                                 <create permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8589                                 <retrieve permission="STAFF_LOGIN" context_field="owning_lib"/>
8590                                 <update permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8591                                 <delete permission="ADMIN_ACQ_LINEITEM_ALERT_TEXT" context_field="owning_lib"/>
8592                         </actions>
8593                 </permacrud>
8594         </class>
8595
8596         <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">
8597                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_note_id_seq">
8598                         <field reporter:label="PO Line Item Note ID" name="id" reporter:datatype="id" />
8599                         <field reporter:label="Line Item" name="lineitem" reporter:datatype="link" />
8600                         <field reporter:label="Creator" name="creator" reporter:datatype="link" />
8601                         <field reporter:label="Creation Time" name="create_time" reporter:datatype="timestamp" />
8602                         <field reporter:label="Edit Time" name="edit_time" reporter:datatype="timestamp" />
8603                         <field reporter:label="Editor" name="editor" reporter:datatype="link" />
8604                         <field reporter:label="Note Value" name="value" reporter:datatype="text" />
8605                         <field reporter:label="Alert Text" name="alert_text" reporter:datatype="link" />
8606                         <field reporter:label="Vendor Public" name="vendor_public" reporter:datatype="bool" />
8607                 </fields>
8608                 <links>
8609                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
8610                         <link field="editor" reltype="has_a" key="id" map="" class="au"/>
8611                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8612                         <link field="alert_text" reltype="has_a" key="id" map="" class="acqliat"/>
8613                 </links>
8614         </class>
8615
8616         <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">
8617                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_id_seq">
8618                         <field reporter:label="Attribute Value ID" name="id" reporter:datatype="id" />
8619                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link" />
8620                         <field reporter:label="Type" name="attr_type" reporter:datatype="text" />
8621                         <field reporter:label="Name" name="attr_name" reporter:datatype="text" />
8622                         <field reporter:label="Value" name="attr_value" reporter:datatype="text" />
8623                         <field reporter:label="Definition" name="definition" reporter:datatype="text" />
8624                         <field reporter:label="Order Identifier" name="order_ident" reporter:datatype="bool" />
8625                 </fields>
8626                 <links>
8627                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8628                         <link field="definition" reltype="has_a" key="id" map="" class="acqliad"/>
8629                 </links>
8630         </class>
8631
8632         <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">
8633                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_detail_id_seq">
8634                         <field reporter:label="Item Detail ID" name="id" reporter:datatype="id" />
8635                         <field reporter:label="PO Line Item" name="lineitem" reporter:datatype="link" />
8636                         <field reporter:label="Evergreen Copy ID" name="eg_copy_id" reporter:datatype="link" />
8637                         <field reporter:label="Barcode" name="barcode" reporter:datatype="text" />
8638                         <field reporter:label="Call Number Label" name="cn_label" reporter:datatype="text" />
8639                         <field reporter:label="Actual Receive Date" name="recv_time" reporter:datatype="timestamp" />
8640                         <field reporter:label="Receiving User" name="receiver" reporter:datatype="link" />
8641                         <field reporter:label="Fund" name="fund" reporter:datatype="link" />
8642                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link" />
8643                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
8644                         <field reporter:label="Copy Location" name="location" reporter:datatype="link" />
8645                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="link" />
8646                         <field reporter:label="Note" name="note" reporter:datatype="text" />
8647                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text" />
8648                         <field reporter:label="Cancel Reason" name="cancel_reason" reporter:datatype="link" />
8649                         <field reporter:label="Claims" name="claims" reporter:datatype="link" oils_persist:virtual="true" />
8650                 </fields>
8651                 <links>
8652                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
8653                         <link field="eg_copy_id" reltype="has_a" key="id" map="" class="acp"/>
8654                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
8655                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
8656                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
8657                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
8658                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
8659                         <link field="cancel_reason" reltype="has_a" key="id" map="" class="acqcr"/>
8660                         <link field="claims" reltype="has_many" key="lineitem_detail" map="" class="acqcl"/>
8661                         <link field="receiver" reltype="has_a" key="id" map="" class="au"/>
8662                 </links>
8663         </class>
8664
8665         <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">
8666                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8667                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8668                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8669                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8670                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8671                 </fields>
8672                 <links/>
8673                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8674                         <actions>
8675                                 <retrieve />
8676                         </actions>
8677                 </permacrud>
8678         </class>
8679
8680         <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">
8681                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8682                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8683                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8684                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8685                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8686                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8687             <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8688                 </fields>
8689                 <links/>
8690         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8691             <actions>
8692                 <create permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8693                 <retrieve />
8694                 <update permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8695                 <delete permission="ADMIN_LINEITEM_MARC_ATTR_DEF" global_required="true"/>
8696             </actions>
8697         </permacrud>
8698         </class>
8699
8700         <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">
8701                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8702                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8703                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8704                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8705                         <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8706                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8707                 </fields>
8708                 <links/>
8709         </class>
8710         <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">
8711                 <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8712                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8713                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8714                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8715                         <field reporter:label="User" name="usr" reporter:datatype="link" />
8716                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8717                 </fields>
8718                 <links>
8719                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
8720                 </links>
8721         </class>
8722
8723         <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">
8724             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8725                 <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8726                 <field reporter:label="Code" name="code" reporter:datatype="text" />
8727                 <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8728                 <field reporter:label="XPath" name="xpath" reporter:datatype="text" />
8729                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8730                 <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8731         <field reporter:label="Remove" name="remove" reporter:datatype="text" />
8732
8733             </fields>
8734             <links>
8735                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8736             </links>
8737             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8738                 <actions>
8739                     <create permission="ADMIN_PROVIDER">
8740                         <context link="provider" field="owner"/>
8741                     </create>
8742                     <retrieve permission="ADMIN_PROVIDER">
8743                         <context link="provider" field="owner"/>
8744                     </retrieve>
8745                     <update permission="ADMIN_PROVIDER">
8746                         <context link="provider" field="owner"/>
8747                     </update>
8748                     <delete permission="ADMIN_PROVIDER">
8749                         <context link="provider" field="owner"/>
8750                     </delete>
8751                 </actions>
8752             </permacrud>
8753         </class>
8754         
8755         <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">
8756             <fields oils_persist:primary="id" oils_persist:sequence="acq.provider_holding_subfield_map_id_seq">
8757                 <field reporter:label="ID" name="id" reporter:datatype="id" />
8758                 <field reporter:label="Provider" name="provider" reporter:datatype="link" />
8759                 <field reporter:label="Name" name="name" reporter:datatype="text" />
8760                 <field reporter:label="Subfield" name="subfield" reporter:datatype="text" />
8761             </fields>
8762             <links>
8763                 <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8764             </links>
8765             <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8766                 <actions>
8767                     <create permission="ADMIN_PROVIDER">
8768                         <context link="provider" field="owner"/>
8769                     </create>
8770                     <retrieve permission="ADMIN_PROVIDER">
8771                         <context link="provider" field="owner"/>
8772                     </retrieve>
8773                     <update permission="ADMIN_PROVIDER">
8774                         <context link="provider" field="owner"/>
8775                     </update>
8776                     <delete permission="ADMIN_PROVIDER">
8777                         <context link="provider" field="owner"/>
8778                     </delete>
8779                 </actions>
8780             </permacrud>
8781         </class>
8782         
8783         <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">
8784             <fields oils_persist:primary="id" oils_persist:sequence="acq.lineitem_attr_definition_id_seq">
8785                         <field reporter:label="Definition ID" name="id" reporter:datatype="id" />
8786                         <field reporter:label="Code" name="code" reporter:datatype="text" />
8787                         <field reporter:label="Description" name="description" reporter:datatype="text" oils_persist:i18n="true" />
8788                         <field reporter:label="Is Identifier?" name="ident" reporter:datatype="bool"/>
8789                 </fields>
8790                 <links/>
8791         </class>
8792
8793         <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">
8794                 <fields oils_persist:primary="id" oils_persist:sequence="config.remote_account_id_seq"><!-- edi_account inherits from config.remote_account, hence the seq -->
8795                         <field name="id"            reporter:datatype="id"        reporter:label="EDI Account ID" reporter:selector="label"/>
8796                         <field name="label"         reporter:datatype="text"      reporter:label="Label"/>
8797                         <field name="host"          reporter:datatype="text"      reporter:label="Host"/>
8798                         <field name="username"      reporter:datatype="text"      reporter:label="Username"/>
8799                         <field name="password"      reporter:datatype="text"      reporter:label="Password"/>
8800                         <field name="account"       reporter:datatype="text"      reporter:label="Account"/>
8801                         <field name="path"          reporter:datatype="text"      reporter:label="Path"/>
8802                         <field name="owner"         reporter:datatype="link"      reporter:label="Owner"/>
8803                         <field name="last_activity" reporter:datatype="timestamp" reporter:label="Last Activity"/>
8804                         <field name="provider"      reporter:datatype="link"      reporter:label="Provider"/>
8805                         <field name="in_dir"        reporter:datatype="text"      reporter:label="Incoming Directory"/>
8806                         <field name="vendacct"      reporter:datatype="text"      reporter:label="Vendor Account Number"/>
8807                         <field name="vendcode"      reporter:datatype="text"      reporter:label="Vendor Assigned Code"/>
8808                 </fields>
8809                 <links>
8810                         <link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
8811                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
8812                 </links>
8813         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8814             <actions>
8815                 <create permission="ADMIN_PROVIDER">
8816                     <context link="provider" field="owner"/>
8817                 </create>
8818                 <retrieve permission="ADMIN_PROVIDER">
8819                     <context link="provider" field="owner"/>
8820                 </retrieve>
8821                 <update permission="ADMIN_PROVIDER">
8822                     <context link="provider" field="owner"/>
8823                 </update>
8824                 <delete permission="ADMIN_PROVIDER">
8825                     <context link="provider" field="owner"/>
8826                 </delete>
8827             </actions>
8828         </permacrud>
8829         </class>
8830
8831         <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">
8832                 <fields oils_persist:primary="id" oils_persist:sequence="acq.edi_message_id_seq">
8833                         <field name="id"               reporter:datatype="id"        reporter:label="EDI Message ID"/>
8834                         <field name="account"          reporter:datatype="link"      reporter:label="EDI Account"/>
8835                         <field name="remote_file"      reporter:datatype="text"      reporter:label="Filename"/>
8836                         <field name="create_time"      reporter:datatype="timestamp" reporter:label="Time Created"/>
8837                         <field name="translate_time"   reporter:datatype="timestamp" reporter:label="Time Translated"/>
8838                         <field name="process_time"     reporter:datatype="timestamp" reporter:label="Time Processed"/>
8839                         <field name="error_time"       reporter:datatype="timestamp" reporter:label="Time of Error"/>
8840                         <field name="status"           reporter:datatype="text"      reporter:label="Status"/>
8841                         <field name="edi"              reporter:datatype="text"      reporter:label="EDI Message Body"/>
8842                         <field name="jedi"             reporter:datatype="text"      reporter:label="JEDI Message Body"/>
8843                         <field name="error"            reporter:datatype="text"      reporter:label="Error"/>
8844                         <field name="purchase_order"   reporter:datatype="link"      reporter:label="Purchase Order"/>
8845                         <field name="message_type"     reporter:datatype="text"      reporter:label="Message Type"/>
8846                 </fields>
8847                 <links>
8848                         <link field="account" reltype="has_a" key="id" map="" class="acqedi"/>
8849                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
8850                 </links>
8851         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
8852             <actions>
8853                 <retrieve permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8854                     <context link="account" jump="provider" field="owner"/>
8855                 </retrieve>
8856                 <update   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8857                     <context link="account" jump="provider" field="owner"/>
8858                 </update>
8859                 <delete   permission="ADMIN_PROVIDER MANAGE_PROVIDER VIEW_PROVIDER">
8860                     <context link="account" jump="provider" field="owner"/>
8861                 </delete>
8862             </actions>
8863         </permacrud>
8864         </class>
8865
8866
8867         <class id="rof" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::output_folder" oils_persist:tablename="reporter.output_folder" reporter:label="Output Folder">
8868                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.output_folder_id_seq">
8869                         <field name="id" reporter:datatype="id" />
8870                         <field name="parent" reporter:datatype="link"/>
8871                         <field name="owner" reporter:datatype="link"/>
8872                         <field name="create_time" reporter:datatype="timestamp"/>
8873                         <field name="name" reporter:datatype="text"/>
8874                         <field name="shared" reporter:datatype="bool"/>
8875                         <field name="share_with" reporter:datatype="link"/>
8876                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8877                         <field name="outputs" oils_persist:virtual="true" reporter:datatype="link"/>
8878                 </fields>
8879                 <links>
8880                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8881                         <link field="parent" reltype="has_a" key="id" map="" class="rof"/>
8882                         <link field="children" reltype="has_many" key="parent" map="" class="rof"/>
8883                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8884                         <link field="outputs" reltype="has_many" key="folder" map="" class="rs"/>
8885                 </links>
8886         </class>
8887         <class id="rtf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template_folder" oils_persist:tablename="reporter.template_folder" reporter:label="Template Folder">
8888                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_folder_id_seq">
8889                         <field name="id" reporter:datatype="id" />
8890                         <field name="parent" reporter:datatype="link"/>
8891                         <field name="owner" reporter:datatype="link"/>
8892                         <field name="create_time" reporter:datatype="timestamp"/>
8893                         <field name="name" reporter:datatype="text"/>
8894                         <field name="shared" reporter:datatype="bool"/>
8895                         <field name="share_with" reporter:datatype="link"/>
8896                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8897                         <field name="templates" oils_persist:virtual="true" reporter:datatype="link"/>
8898                 </fields>
8899                 <links>
8900                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8901                         <link field="parent" reltype="has_a" key="id" map="" class="rtf"/>
8902                         <link field="children" reltype="has_many" key="parent" map="" class="rtf"/>
8903                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8904                         <link field="templates" reltype="has_many" key="folder" map="" class="rt"/>
8905                 </links>
8906         </class>
8907         <class id="rrf" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report_folder" oils_persist:tablename="reporter.report_folder" reporter:label="Report Folder">
8908                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_folder_id_seq">
8909                         <field name="id" reporter:datatype="id" />
8910                         <field name="parent" reporter:datatype="link"/>
8911                         <field name="owner" reporter:datatype="link"/>
8912                         <field name="create_time" reporter:datatype="timestamp"/>
8913                         <field name="name" reporter:datatype="text"/>
8914                         <field name="shared" reporter:datatype="bool"/>
8915                         <field name="share_with" reporter:datatype="link"/>
8916                         <field name="children" oils_persist:virtual="true" reporter:datatype="link"/>
8917                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8918                 </fields>
8919                 <links>
8920                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8921                         <link field="parent" reltype="has_a" key="id" map="" class="rrf"/>
8922                         <link field="children" reltype="has_many" key="parent" map="" class="rrf"/>
8923                         <link field="share_with" reltype="has_a" key="id" map="" class="aou"/>
8924                         <link field="reports" reltype="has_many" key="folder" map="" class="rr"/>
8925                 </links>
8926         </class>
8927         <class id="rt" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::template" oils_persist:tablename="reporter.template" reporter:label="Template">
8928                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.template_id_seq">
8929                         <field name="id" reporter:datatype="id" />
8930                         <field name="owner" reporter:datatype="link"/>
8931                         <field name="create_time" reporter:datatype="timestamp"/>
8932                         <field name="name" reporter:datatype="text"/>
8933                         <field name="data" reporter:datatype="text"/>
8934                         <field name="folder" reporter:datatype="link"/>
8935                         <field name="description" reporter:datatype="text"/>
8936                         <field name="reports" oils_persist:virtual="true" reporter:datatype="link"/>
8937                 </fields>
8938                 <links>
8939                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8940                         <link field="folder" reltype="has_a" key="id" map="" class="rtf"/>
8941                         <link field="reports" reltype="has_many" key="template" map="" class="rr"/>
8942                 </links>
8943         </class>
8944         <class id="rr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::report" oils_persist:tablename="reporter.report" reporter:label="Report">
8945                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.report_id_seq">
8946                         <field name="id" reporter:datatype="id" />
8947                         <field name="owner" reporter:datatype="link"/>
8948                         <field name="create_time" reporter:datatype="timestamp"/>
8949                         <field name="template" reporter:datatype="link"/>
8950                         <field name="data" reporter:datatype="text"/>
8951                         <field name="folder" reporter:datatype="link"/>
8952                         <field name="recur" reporter:datatype="bool"/>
8953                         <field name="recurrence" reporter:datatype="interval"/>
8954                         <field name="name" reporter:datatype="text"/>
8955                         <field name="description" reporter:datatype="text"/>
8956                         <field name="runs" oils_persist:virtual="true" reporter:datatype="link"/>
8957                 </fields>
8958                 <links>
8959                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
8960                         <link field="template" reltype="has_a" key="id" map="" class="rt"/>
8961                         <link field="folder" reltype="has_a" key="id" map="" class="rrf"/>
8962                         <link field="runs" reltype="has_many" key="report" map="" class="rs"/>
8963                 </links>
8964         </class>
8965         <class id="rs" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::schedule" oils_persist:tablename="reporter.schedule" reporter:label="Schedule">
8966                 <fields oils_persist:primary="id" oils_persist:sequence="reporter.schedule_id_seq">
8967                         <field name="id" reporter:datatype="id" />
8968                         <field name="runner" reporter:datatype="link"/>
8969                         <field name="start_time" reporter:datatype="timestamp"/>
8970                         <field name="complete_time" reporter:datatype="timestamp"/>
8971                         <field name="run_time" reporter:datatype="timestamp"/>
8972                         <field name="email" reporter:datatype="text"/>
8973                         <field name="excel_format" reporter:datatype="bool"/>
8974                         <field name="csv_format" reporter:datatype="bool"/>
8975                         <field name="html_format" reporter:datatype="bool"/>
8976                         <field name="error_code" reporter:datatype="int"/>
8977                         <field name="error_text" reporter:datatype="text"/>
8978                         <field name="report" reporter:datatype="link"/>
8979                         <field name="folder" reporter:datatype="link"/>
8980                         <field name="chart_pie" reporter:datatype="bool"/>
8981                         <field name="chart_bar" reporter:datatype="bool"/>
8982                         <field name="chart_line" reporter:datatype="bool"/>
8983                 </fields>
8984                 <links>
8985                         <link field="runner" reltype="has_a" key="id" map="" class="au"/>
8986                         <link field="report" reltype="has_a" key="id" map="" class="rr"/>
8987                         <link field="folder" reltype="has_a" key="id" map="" class="rof"/>
8988                 </links>
8989         </class>
8990         <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">
8991                 <fields oils_persist:primary="id">
8992                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
8993                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
8994                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
8995                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
8996                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
8997                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
8998                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
8999                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9000                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9001                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9002                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9003                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9004                 </fields>
9005                 <links>
9006                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9007                 </links>
9008                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9009                         <actions>
9010                                 <retrieve />
9011                         </actions>
9012                 </permacrud>
9013         </class>
9014         <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">
9015                 <fields oils_persist:primary="id">
9016                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9017                         <field reporter:label="Fingerprint" name="fingerprint" reporter:datatype="text"/>
9018                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9019                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9020                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9021                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9022                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9023                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9024                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9025                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9026                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9027                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9028                 </fields>
9029                 <links>
9030                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9031                 </links>
9032         </class>
9033         <class id="rsr" controller="open-ils.reporter-store" oils_obj:fieldmapper="reporter::simple_record" oils_persist:tablename="reporter.simple_record" reporter:label="Simple Record">
9034                 <fields oils_persist:primary="id">
9035                         <field reporter:label="Record ID" name="id" reporter:datatype="id" />
9036                         <field reporter:label="Metarecord" name="metarecord" reporter:datatype="link"/>
9037                         <field reporter:label="Fingerprint" name="fingerprint" />
9038                         <field reporter:label="Overall Record Quality" name="quality" reporter:datatype="int"/>
9039                         <field reporter:label="TCN Source" name="tcn_source" reporter:datatype="text"/>
9040                         <field reporter:label="TCN Value" name="tcn_value" reporter:datatype="text"/>
9041                         <field reporter:label="Title Proper (normalized)" name="title" reporter:datatype="text"/>
9042                         <field reporter:label="Uniform Title (normalized)" name="uniform_title" reporter:datatype="text"/>
9043                         <field reporter:label="Author (normalized)" name="author" reporter:datatype="text"/>
9044                         <field reporter:label="Publisher (normalized)" name="publisher" reporter:datatype="text"/>
9045                         <field reporter:label="Publication Year (normalized)" name="pubdate" reporter:datatype="int"/>
9046                         <field reporter:label="Series Title (normalized)" name="series_title" reporter:datatype="text"/>
9047                         <field reporter:label="Series Statement (normalized)" name="series_statement" reporter:datatype="text"/>
9048                         <field reporter:label="Summary (normalized)" name="summary" reporter:datatype="text"/>
9049                         <field reporter:label="ISBN" name="isbn" reporter:datatype="text"/>
9050                         <field reporter:label="ISSN" name="issn" reporter:datatype="text"/>
9051                         <field reporter:label="Topic Subjects (normalized)" name="topic_subject" reporter:datatype="text"/>
9052                         <field reporter:label="Geographic Subjects (normalized)" name="geographic_subject" reporter:datatype="text"/>
9053                         <field reporter:label="Genres (normalized)" name="genre" reporter:datatype="text"/>
9054                         <field reporter:label="Personal Name Subjects (normalized)" name="name_subject" reporter:datatype="text"/>
9055                         <field reporter:label="Corporate Name Subjects (normalized)" name="corporate_subject" reporter:datatype="text"/>
9056                         <field reporter:label="External URI List (normalized)" name="external_uri" reporter:datatype="text"/>
9057                         <field reporter:label="Full Bibliographic record" name="biblio_record" oils_persist:virtual="true" reporter:datatype="link"/>
9058                 </fields>
9059                 <links>
9060                         <link field="metarecord" reltype="has_a" key="id" map="" class="mmr"/>
9061                         <link field="biblio_record" reltype="might_have" key="id" map="" class="bre"/>
9062                 </links>
9063         </class>
9064         <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">
9065                 <fields oils_persist:primary="id">
9066                         <field reporter:label="User ID" name="id" reporter:datatype="id" />
9067                         <field reporter:label="Date of Birth" name="dob" reporter:datatype="timestamp"/>
9068                         <field reporter:label="General Demographic Division" name="general_division" reporter:datatype="text"/>
9069                 </fields>
9070                 <links>
9071                         <link field="id" reltype="might_have" key="id" map="" class="au"/>
9072                 </links>
9073         </class>
9074         <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">
9075                 <fields oils_persist:primary="id">
9076                         <field reporter:label="Circulation ID" name="id" reporter:datatype="id" />
9077                         <field reporter:label="Circulation Type" name="type" reporter:datatype="text"/>
9078                 </fields>
9079                 <links>
9080                         <link field="id" reltype="might_have" key="id" map="" class="circ"/>
9081                 </links>
9082         </class>
9083         <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">
9084                 <fields oils_persist:primary="id">
9085                         <field reporter:label="Hold ID" name="id" reporter:datatype="id" />
9086                         <field reporter:label="Hold Target" name="target" reporter:datatype="int" />
9087                         <field reporter:label="Hold Request Type" name="hold_type" reporter:datatype="text"/>
9088                         <field reporter:label="Target Bib Record" name="bib_record" reporter:datatype="link"/>
9089                 </fields>
9090                 <links>
9091                         <link field="id" reltype="might_have" key="id" map="" class="ahr"/>
9092                         <link field="bib_record" reltype="has_a" key="id" map="" class="bre"/>
9093                 </links>
9094         </class>
9095         <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">
9096                 <fields oils_persist:primary="xact">
9097                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9098                         <field reporter:label="Unvoided Billing Amount" name="unvoided" reporter:datatype="int" />
9099                         <field reporter:label="Voided Billing Amount" name="voided" reporter:datatype="money"/>
9100                         <field reporter:label="Total Billing Amount" name="total" reporter:datatype="money"/>
9101                 </fields>
9102                 <links>
9103                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9104                 </links>
9105         </class>
9106         <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">
9107                 <fields oils_persist:primary="xact">
9108                         <field reporter:label="Transaction ID" name="xact" reporter:datatype="int" />
9109                         <field reporter:label="Unvoided Paid Amount" name="unvoided" reporter:datatype="int" />
9110                         <field reporter:label="Voided (Returned) Paid Amount" name="voided" reporter:datatype="money"/>
9111                         <field reporter:label="Total Paid Amount" name="total" reporter:datatype="money"/>
9112                 </fields>
9113                 <links>
9114                         <link field="xact" reltype="might_have" key="id" map="" class="mbt"/>
9115                 </links>
9116         </class>
9117         <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)">
9118                 <fields oils_persist:primary="id">
9119                         <field reporter:label="Bib ID" name="id" reporter:datatype="id" />
9120                         <field reporter:label="Update Time" name="holding_update" reporter:datatype="timestamp" />
9121                         <field reporter:label="Update Type" name="update_type" reporter:datatype="text" />
9122                 </fields>
9123                 <links>
9124                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
9125                 </links>
9126         </class>
9127         <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">
9128                 <fields oils_persist:primary="id">
9129                         <field reporter:label="Copy ID" name="id" reporter:datatype="int" />
9130                         <field reporter:label="Total Circulation Count" name="circ_count" reporter:datatype="int" />
9131                 </fields>
9132                 <links>
9133                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
9134                 </links>
9135         </class>
9136         <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">
9137                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_id_seq">
9138                         <field reporter:label="Formula ID" name="id" reporter:datatype="id" reporter:selector="name" />
9139                         <field reporter:label="Formula Owner" name="owner" reporter:datatype="org_unit"/>
9140                         <field reporter:label="Formula Name" name="name" reporter:datatype="text"/>
9141                         <field reporter:label="Skip Count" name="skip_count" reporter:datatype="int"/>
9142                         <field reporter:label="Entries" name="entries" oils_persist:virtual="true" reporter:datatype="link"/>
9143                         <field reporter:label="Use Count" name="use_count" oils_persist:virtual="true" reporter:datatype="int"/>
9144                 </fields>
9145                 <links>
9146                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
9147                         <link field="entries" reltype="has_many" key="formula" map="" class="acqdfe"/>
9148                 </links>
9149                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9150                         <actions>
9151                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9152                                 <retrieve permission="CREATE_PURCHASE_ORDER ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9153                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9154                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA" context_field="owner"/>
9155                         </actions>
9156                 </permacrud>
9157         </class>
9158         <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">
9159                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_entry_id_seq">
9160                         <field reporter:label="Entry ID" name="id" reporter:datatype="id"/>
9161                         <field reporter:label="Formula ID" name="formula" reporter:datatype="link"/>
9162                         <field reporter:label="Position" name="position" reporter:datatype="int"/>
9163                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
9164                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
9165                         <field reporter:label="Location" name="location" reporter:datatype="link"/>
9166                         <field reporter:label="Fund" name="fund" reporter:datatype="link"/>
9167                         <field reporter:label="Circulation Modifier" name="circ_modifier" reporter:datatype="link"/>
9168                         <field reporter:label="Collection Code" name="collection_code" reporter:datatype="text"/>
9169                 </fields>
9170                 <links>
9171                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9172                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9173                         <link field="location" reltype="has_a" key="id" map="" class="acpl"/>
9174                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
9175                         <link field="circ_modifier" reltype="has_a" key="code" map="" class="ccm"/>
9176                 </links>
9177                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9178                         <actions>
9179                                 <create permission="ADMIN_ACQ_DISTRIB_FORMULA">
9180                                         <context link="formula" field="owner"/>
9181                                 </create>
9182                                 <retrieve permission="ADMIN_ACQ_DISTRIB_FORMULA">
9183                                         <context link="formula" field="owner"/>
9184                                 </retrieve>
9185                                 <update permission="ADMIN_ACQ_DISTRIB_FORMULA">
9186                                         <context link="formula" field="owner"/>
9187                                 </update>
9188                                 <delete permission="ADMIN_ACQ_DISTRIB_FORMULA">
9189                                         <context link="formula" field="owner"/>
9190                                 </delete>
9191                         </actions>
9192                 </permacrud>
9193         </class>
9194
9195         <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">
9196                 <fields oils_persist:primary="id" oils_persist:sequence="acq.distribution_formula_application_id_seq">
9197                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
9198                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9199                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
9200                         <field reporter:label="Distribution Formula" name="formula" reporter:datatype="link"/>
9201                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
9202                 </fields>
9203                 <links>
9204                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9205                         <link field="formula" reltype="has_a" key="id" map="" class="acqdf"/>
9206                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
9207                 </links>
9208                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9209                         <actions>
9210                                 <create permission="CREATE_PURCHASE_ORDER">
9211                                         <context link="formula" field="owner"/>
9212                 </create>
9213                                 <retrieve permission="CREATE_PURCHASE_ORDER">
9214                                         <context link="formula" field="owner"/>
9215                 </retrieve>
9216                                 <update permission="CREATE_PURCHASE_ORDER">
9217                                         <context link="formula" field="owner"/>
9218                 </update>
9219                                 <delete permission="CREATE_PURCHASE_ORDER">
9220                                         <context link="formula" field="owner"/>
9221                 </delete>
9222                         </actions>
9223                 </permacrud>
9224         </class>
9225
9226         <class id="acqda" controller="open-ils.cstore" oils_obj:fieldmapper="acq::debit_attribution" oils_persist:tablename="acq.debit_attribution" reporter:label="Debit Attribution">
9227                 <fields oils_persist:primary="id">
9228                         <field reporter:label="Debit Attribution ID" name="id" reporter:datatype="id"/>
9229                         <field reporter:label="Fund Debit" name="fund_debit" reporter:datatype="link"/>
9230                         <field reporter:label="Debit Amount" name="debit_amount" reporter:datatype="money"/>
9231                         <field reporter:label="Funding Source Credit" name="funding_source_credit" reporter:datatype="link"/>
9232                         <field reporter:label="Credit Amount" name="credit_amount" reporter:datatype="money"/>
9233                 </fields>
9234                 <links>
9235                         <link field="fund_debit" reltype="has_a" key="id" map="" class="acqfdeb"/>
9236                         <link field="funding_source_credit" reltype="has_a" key="id" map="" class="acqfscred"/>
9237                 </links>
9238         </class>
9239
9240         <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">
9241                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_type_id_seq">
9242                         <field reporter:label="Claim Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9243                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9244                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9245                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9246                 </fields>
9247                 <links>
9248                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9249                 </links>
9250                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9251                         <actions>
9252                                 <create permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9253                                 <retrieve permission="ADMIN_ACQ_CLAIM_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9254                                 <update permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9255                                 <delete permission="ADMIN_ACQ_CLAIM_TYPE" context_field="org_unit"/>
9256                         </actions>
9257                 </permacrud>
9258         </class>
9259
9260         <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">
9261                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_type_id_seq">
9262                         <field reporter:label="Claim Event Type ID" name="id" reporter:datatype="id" reporter:selector="code" />
9263                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9264                         <field reporter:label="Code" name="code" reporter:datatype="text"/>
9265                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9266                         <field reporter:label="Library Initiated" name="library_initiated" reporter:datatype="bool"/>
9267                 </fields>
9268                 <links>
9269                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9270                 </links>
9271                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9272                         <actions>
9273                                 <create permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9274                                 <retrieve permission="ADMIN_ACQ_CLAIM_EVENT_TYPE ADMIN_ACQ_CLAIM VIEW_CLAIM MANAGE_CLAIM" context_field="org_unit"/>
9275                                 <update permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9276                                 <delete permission="ADMIN_ACQ_CLAIM_EVENT_TYPE" context_field="org_unit"/>
9277                         </actions>
9278                 </permacrud>
9279         </class>
9280
9281         <class id="acqcl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim" oils_persist:tablename="acq.claim" reporter:label="Claim">
9282                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_id_seq">
9283                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9284                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9285                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
9286                 </fields>
9287                 <links>
9288                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9289                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
9290                 </links>
9291         </class>
9292
9293         <class id="acqcle" controller="open-ils.cstore" oils_obj:fieldmapper="acq::claim_event" oils_persist:tablename="acq.claim_event" reporter:label="Claim Event">
9294                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_event_id_seq">
9295                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9296                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9297                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9298                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9299                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9300                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9301                 </fields>
9302                 <links>
9303                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9304                         <link field="claim" reltype="has_a" key="id" map="" class="acqcl"/>
9305                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9306                 </links>
9307         </class>
9308
9309         <class id="acqscl" controller="open-ils.cstore" oils_obj:fieldmapper="acq::serial_claim" oils_persist:tablename="acq.serial_claim" reporter:label="Serial Claim">
9310                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_id_seq">
9311                         <field reporter:label="Claim ID" name="id" reporter:datatype="id"/>
9312                         <field reporter:label="Claim Type" name="type" reporter:datatype="link"/>
9313                         <field reporter:label="Serial Item" name="item" reporter:datatype="link"/>
9314                 </fields>
9315                 <links>
9316                         <link field="type" reltype="has_a" key="id" map="" class="acqclt"/>
9317                         <link field="item" reltype="has_a" key="id" map="" class="sitem"/>
9318                 </links>
9319         </class>
9320
9321         <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">
9322                 <fields oils_persist:primary="id" oils_persist:sequence="acq.serial_claim_event_id_seq">
9323                         <field reporter:label="Claim Event ID" name="id" reporter:datatype="id"/>
9324                         <field reporter:label="Claim Event Type" name="type" reporter:datatype="link"/>
9325                         <field reporter:label="Claim ID" name="claim" reporter:datatype="link"/>
9326                         <field reporter:label="Event Date" name="event_date" reporter:datatype="timestamp"/>
9327                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
9328                         <field reporter:label="Note" name="note" reporter:datatype="text"/>
9329                 </fields>
9330                 <links>
9331                         <link field="type" reltype="has_a" key="id" map="" class="acqclet"/>
9332                         <link field="claim" reltype="has_a" key="id" map="" class="acqscl"/>
9333                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
9334                 </links>
9335         </class>
9336
9337         <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">
9338                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_id_seq">
9339                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="name"/>
9340                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="org_unit"/>
9341                         <field reporter:label="Claim Policy Name" name="name" reporter:datatype="text"/>
9342                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9343                 </fields>
9344                 <links>
9345                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
9346                 </links>
9347                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9348             <actions>
9349                 <create   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9350                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER" context_field="org_unit"/>
9351                 <update   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9352                 <delete   permission="ADMIN_CLAIM_POLICY" context_field="org_unit"/>
9353             </actions>
9354                 </permacrud>
9355         </class>
9356
9357         <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">
9358                 <fields oils_persist:primary="id" oils_persist:sequence="acq.claim_policy_action_id_seq">
9359                         <field reporter:label="ID" name="id" reporter:datatype="id" reporter:selector="action"/>
9360                         <field reporter:label="Claim Policy ID" name="claim_policy" reporter:datatype="link"/>
9361                         <field reporter:label="Action Interval" name="action_interval" reporter:datatype="interval"/>
9362                         <field reporter:label="Action (Event Type)" name="action" reporter:datatype="link"/>
9363                 </fields>
9364                 <links>
9365                         <link field="claim_policy" reltype="has_a" key="id" map="" class="acqclp"/>
9366                         <link field="action" reltype="has_a" key="id" map="" class="acqclet"/>
9367                 </links>
9368                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
9369                         <actions>
9370                                 <create permission="ADMIN_CLAIM_POLICY">
9371                                         <context link="claim_policy" field="org_unit"/>
9372                 </create>
9373                                 <retrieve permission="ADMIN_CLAIM_POLICY VIEW_PROVIDER">
9374                                         <context link="claim_policy" field="org_unit"/>
9375                 </retrieve>
9376                                 <update permission="ADMIN_CLAIM_POLICY">
9377                                         <context link="claim_policy" field="org_unit"/>
9378                 </update>
9379                                 <delete permission="ADMIN_CLAIM_POLICY">
9380                                         <context link="claim_policy" field="org_unit"/>
9381                 </delete>
9382                         </actions>
9383                 </permacrud>
9384         </class>
9385
9386     <class id="stgu" controller="open-ils.cstore" oils_obj:fieldmapper="staging::user_stage" oils_persist:tablename="staging.user_stage" reporter:label="User Stage">
9387         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.user_stage_row_id_seq">
9388             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9389             <field reporter:label="Create Date" name="row_date" reporter:datatype="timestamp"/>
9390             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9391             <field reporter:label="Main (Profile) Permission Group" name="profile" reporter:datatype="text"/>
9392             <field reporter:label="Email Address" name="email" reporter:datatype="text"/>
9393             <field reporter:label="Password" name="passwd" reporter:datatype="text"/>
9394             <field reporter:label="Primary Identification Type" name="ident_type" reporter:datatype="int"/>
9395             <field reporter:label="First Name" name="first_given_name" reporter:datatype="text"/>
9396             <field reporter:label="Middle Name" name="second_given_name" reporter:datatype="text"/>
9397             <field reporter:label="Last Name" name="family_name" reporter:datatype="text"/>
9398             <field reporter:label="Daytime Phone" name="day_phone" reporter:datatype="text"/>
9399             <field reporter:label="Evening Phone" name="evening_phone" reporter:datatype="text"/>
9400             <field reporter:label="Home Library" name="home_ou" reporter:datatype="int"/>
9401             <field reporter:label="Date of Birth" name="dob" reporter:datatype="text"/>
9402             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9403             <field reporter:label="Requesting User" name="requesting_usr" reporter:datatype="link"/>
9404         </fields>
9405         <links>
9406             <link field="requesting_usr" reltype="has_a" key="id" map="" class="au"/>
9407         </links>
9408     </class>
9409
9410     <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">
9411         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.card_stage_row_id_seq">
9412             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9413             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9414             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9415             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
9416             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9417         </fields>
9418     </class>
9419
9420     <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">
9421         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9422             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9423             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9424             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9425             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9426             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9427             <field reporter:label="City" name="city" reporter:datatype="text"/>
9428             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9429             <field reporter:label="State" name="state" reporter:datatype="text"/>
9430             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9431             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9432             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9433         </fields>
9434     </class>
9435
9436     <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">
9437         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.mailing_address_stage_row_id_seq">
9438             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9439             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9440             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9441             <field reporter:label="Street (1)" name="street1" reporter:datatype="text"/>
9442             <field reporter:label="Street (2)" name="street2" reporter:datatype="text"/>
9443             <field reporter:label="City" name="city" reporter:datatype="text"/>
9444             <field reporter:label="County" name="county"  reporter:datatype="text"/>
9445             <field reporter:label="State" name="state" reporter:datatype="text"/>
9446             <field reporter:label="Country" name="country" reporter:datatype="text"/>
9447             <field reporter:label="Postal Code" name="post_code" reporter:datatype="text"/>
9448             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9449         </fields>
9450     </class>
9451
9452     <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">
9453         <fields oils_persist:primary="row_id" oils_persist:sequence="staging.statcat_stage_row_id_seq">
9454             <field reporter:label="Row ID" name="row_id" reporter:datatype="id"/>
9455             <field reporter:label="Row Date" name="row_date" reporter:datatype="timestamp"/>
9456             <field reporter:label="User Name" name="usrname" reporter:datatype="text"/>
9457             <field reporter:label="Stat Cat ID" name="statcat" reporter:datatype="text"/>
9458             <field reporter:label="Stat Cat Value" name="value" reporter:datatype="text"/>
9459             <field reporter:label="Complete" name="complete" reporter:datatype="bool"/>
9460         </fields>
9461     </class>
9462
9463         <class id="afs" controller="open-ils.cstore" oils_obj:fieldmapper="action::fieldset" oils_persist:tablename="action.fieldset" reporter:label="Fieldset">
9464                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_id_seq">
9465                         <field reporter:label="Fieldset ID" name="id" reporter:datatype="id"/>
9466                         <field reporter:label="Owner" name="owner" reporter:datatype="link"/>
9467                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="link"/>
9468                         <field reporter:label="Status" name="status" reporter:datatype="text"/>
9469                         <field reporter:label="Creation Time" name="creation_time" reporter:datatype="timestamp"/>
9470                         <field reporter:label="Scheduled Time" name="scheduled_time" reporter:datatype="timestamp"/>
9471                         <field reporter:label="Applied Time" name="applied_time" reporter:datatype="timestamp"/>
9472                         <field reporter:label="Class Name" name="classname" reporter:datatype="text"/>
9473                         <field reporter:label="Fieldset Name" name="name" reporter:datatype="text"/>
9474                         <field reporter:label="Stored Query" name="stored_query" reporter:datatype="link"/>
9475                         <field reporter:label="Primary Key Value" name="pkey_value" reporter:datatype="text"/>
9476                 </fields>
9477                 <links>
9478                         <link field="owner" reltype="has_a" key="id" map="" class="au"/>
9479                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
9480                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9481                 </links>
9482         </class>
9483
9484         <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">
9485                 <fields oils_persist:primary="id" oils_persist:sequence="action.fieldset_col_val_id_seq">
9486                         <field reporter:label="Column Value ID" name="id" reporter:datatype="id"/>
9487                         <field reporter:label="Fieldset ID" name="fieldset" reporter:datatype="link"/>
9488                         <field reporter:label="Column Name" name="col" reporter:datatype="text"/>
9489                         <field reporter:label="Column Value" name="val" reporter:datatype="text"/>
9490                 </fields>
9491                 <links>
9492                         <link field="fieldset" reltype="has_a" key="id" map="" class="afs"/>
9493                 </links>
9494         </class>
9495
9496     <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">
9497         <fields>
9498             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9499             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9500             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9501         </fields>
9502                 <links>
9503                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9504                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9505                 </links>
9506     </class>
9507
9508     <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">
9509         <fields>
9510             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9511             <field reporter:label="Min Loop" name="min" reporter:datatype="int"/>
9512         </fields>
9513                 <links>
9514                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9515                 </links>
9516     </class>
9517
9518     <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">
9519         <fields>
9520             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9521             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9522             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9523         </fields>
9524                 <links>
9525                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9526                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9527                 </links>
9528     </class>
9529
9530     <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">
9531         <fields>
9532             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9533             <field reporter:label="Max Loop" name="max" reporter:datatype="int"/>
9534         </fields>
9535                 <links>
9536                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9537                 </links>
9538     </class>
9539
9540     <class id="aufhol" controller="open-ils.cstore" oils_obj:fieldmapper="action::unfulfilled_hold_outermost_loop" oils_persist:readonly="true">
9541                 <oils_persist:source_definition>
9542
9543             SELECT  DISTINCT l.*
9544               FROM  action.unfulfilled_hold_loops l
9545                     JOIN action.unfulfilled_hold_max_loop m USING (hold)
9546               WHERE l.count = m.max
9547
9548                 </oils_persist:source_definition>
9549         <fields>
9550             <field reporter:label="Hold ID" name="hold" reporter:datatype="link"/>
9551             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="link"/>
9552             <field reporter:label="Loop Count" name="count" reporter:datatype="int"/>
9553         </fields>
9554                 <links>
9555                         <link field="hold" reltype="has_a" key="id" map="" class="ahr"/>
9556                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
9557                 </links>
9558     </class>
9559
9560         <class id="qsq" controller="open-ils.cstore" oils_obj:fieldmapper="query::stored_query" oils_persist:tablename="query.stored_query" reporter:label="Stored Query">
9561                 <fields oils_persist:primary="id" oils_persist:sequence="query.stored_query_id_seq">
9562                         <field reporter:label="Query ID" name="id" reporter:datatype="id"/>
9563                         <field reporter:label="Query type" name="type" reporter:datatype="text"/>
9564                         <field reporter:label="Use ALL" name="use_all" reporter:datatype="bool"/>
9565                         <field reporter:label="Use DISTINCT" name="use_distinct" reporter:datatype="bool"/>
9566                         <field reporter:label="FROM Clause" name="from_clause" reporter:datatype="link"/>
9567                         <field reporter:label="WHERE Clause" name="where_clause" reporter:datatype="link"/>
9568                         <field reporter:label="HAVING Clause" name="having_clause" reporter:datatype="link"/>
9569                         <field reporter:label="LIMIT count" name="limit_count" reporter:datatype="link"/>
9570                         <field reporter:label="OFFSET count" name="offset_count" reporter:datatype="link"/>
9571                 </fields>
9572                 <links>
9573                         <link field="from_clause" reltype="has_a" key="id" map="" class="qfr"/>
9574                         <link field="having_clause" reltype="has_a" key="id" map="" class="qxp"/>
9575                         <link field="where_clause" reltype="has_a" key="id" map="" class="qxp"/>
9576                         <link field="limit_count" reltype="has_a" key="id" map="" class="qxp"/>
9577                         <link field="offset_count" reltype="has_a" key="id" map="" class="qxp"/>
9578                 </links>
9579         </class>
9580
9581         <class id="qseq" controller="open-ils.cstore" oils_obj:fieldmapper="query::query_sequence" oils_persist:tablename="query.query_sequence" reporter:label="Query Sequence">
9582                 <fields oils_persist:primary="id" oils_persist:sequence="query.query_sequence_id_seq">
9583                         <field reporter:label="Query Seq ID" name="id" reporter:datatype="id"/>
9584                         <field reporter:label="Parent Query" name="parent_query" reporter:datatype="link"/>
9585                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9586                         <field reporter:label="Child Query" name="child_query" reporter:datatype="link"/>
9587                 </fields>
9588                 <links>
9589                         <link field="parent_query" reltype="has_a" key="id" map="" class="qsq"/>
9590                         <link field="child_query" reltype="has_a" key="id" map="" class="qsq"/>
9591                 </links>
9592         </class>
9593
9594         <class id="qdt" controller="open-ils.cstore" oils_obj:fieldmapper="query::datatype" oils_persist:tablename="query.datatype" reporter:label="Datatype">
9595                 <fields oils_persist:primary="id" oils_persist:sequence="query.datatype_id_seq">
9596                         <field reporter:label="Datatype ID" name="id" reporter:datatype="id"/>
9597                         <field reporter:label="Datatype Name" name="datatype_name" reporter:datatype="text"/>
9598                         <field reporter:label="Is Numeric" name="is_numeric" reporter:datatype="bool"/>
9599                         <field reporter:label="Is Composite" name="is_composite" reporter:datatype="bool"/>
9600                 </fields>
9601                 <links>
9602                 </links>
9603         </class>
9604
9605         <class id="qsf" controller="open-ils.cstore" oils_obj:fieldmapper="query::subfield" oils_persist:tablename="query.subfield" reporter:label="Subfield">
9606                 <fields oils_persist:primary="id" oils_persist:sequence="query.subfield_id_seq">
9607                         <field reporter:label="Subfield ID" name="id" reporter:datatype="id"/>
9608                         <field reporter:label="Composite Type" name="composite_type" reporter:datatype="link"/>
9609                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9610                         <field reporter:label="Subfield Type" name="subfield_type" reporter:datatype="link"/>
9611                 </fields>
9612                 <links>
9613                         <link field="composite_type" reltype="has_a" key="id" map="" class="qdt"/>
9614                         <link field="subfield_type" reltype="has_a" key="id" map="" class="qdt"/>
9615                 </links>
9616         </class>
9617         
9618         <class id="qfs" controller="open-ils.cstore" oils_obj:fieldmapper="query::function_sig" oils_persist:tablename="query.function_sig" reporter:label="Function Signature">
9619                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_sig_id_seq">
9620                         <field reporter:label="Function Signature ID" name="id" reporter:datatype="id"/>
9621                         <field reporter:label="Function Name" name="function_name" reporter:datatype="text"/>
9622                         <field reporter:label="Return Type" name="return_type" reporter:datatype="link"/>
9623                         <field reporter:label="Is Aggregate" name="is_aggregate" reporter:datatype="bool"/>
9624                 </fields>
9625                 <links>
9626                         <link field="return_type" reltype="has_a" key="id" map="" class="qdt"/>
9627                 </links>
9628         </class>
9629         
9630         <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">
9631                 <fields oils_persist:primary="id" oils_persist:sequence="query.function_param_def_id_seq">
9632                         <field reporter:label="Function Param Def ID" name="id" reporter:datatype="id"/>
9633                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9634                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9635                         <field reporter:label="Datatype" name="datatype" reporter:datatype="link"/>
9636                 </fields>
9637                 <links>
9638                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9639                         <link field="datatype" reltype="has_a" key="id" map="" class="qdt"/>
9640                 </links>
9641         </class>
9642
9643         <class id="qbv" controller="open-ils.cstore" oils_obj:fieldmapper="query::bind_variable" oils_persist:tablename="query.bind_variable" reporter:label="Bind Variable">
9644                 <fields oils_persist:primary="name">
9645                         <field reporter:label="Name" name="name" reporter:datatype="id"/>
9646                         <field reporter:label="Label" name="label" reporter:datatype="text" oils_persist:i18n="true"/>
9647                         <field reporter:label="Type" name="type" reporter:datatype="text"/>
9648                         <field reporter:label="Description" name="description" reporter:datatype="text"/>
9649                         <field reporter:label="Default Value" name="default_value" reporter:datatype="text"/>
9650                         <field reporter:label="Actual Value" name="actual_value" oils_persist:virtual="true" reporter:datatype="text"/>
9651                 </fields>
9652                 <links>
9653                 </links>
9654         </class>
9655
9656         <class id="qxp" controller="open-ils.cstore" oils_obj:fieldmapper="query::expression" oils_persist:tablename="query.expression" reporter:label="Expression">
9657                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9658                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9659                         <field reporter:label="Expression Type" name="type" reporter:datatype="text"/>
9660                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9661                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9662                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9663                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9664                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9665                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9666                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9667                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9668                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9669                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9670                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9671                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9672                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9673                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9674                 </fields>
9675                 <links>
9676                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9677                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9678                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9679                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9680                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9681                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9682                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9683                 </links>
9684         </class>
9685
9686         <class id="qcb" controller="open-ils.cstore" oils_obj:fieldmapper="query::case_branch" oils_persist:tablename="query.case_branch" reporter:label="Case Branch">
9687                 <fields oils_persist:primary="id" oils_persist:sequence="query.case_branch_id_seq">
9688                         <field reporter:label="Case Branch ID" name="id" reporter:datatype="id"/>
9689                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9690                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9691                         <field reporter:label="Condition" name="condition" reporter:datatype="link"/>
9692                         <field reporter:label="Result" name="result" reporter:datatype="link"/>
9693                 </fields>
9694                 <links>
9695                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9696                         <link field="condition" reltype="has_a" key="id" map="" class="qxp"/>
9697                         <link field="result" reltype="has_a" key="id" map="" class="qxp"/>
9698                 </links>
9699         </class>
9700
9701         <class id="qfr" controller="open-ils.cstore" oils_obj:fieldmapper="query::from_relation" oils_persist:tablename="query.from_relation" reporter:label="From Relation">
9702                 <fields oils_persist:primary="id" oils_persist:sequence="query.from_relation_id_seq">
9703                         <field reporter:label="From Relation ID" name="id" reporter:datatype="id"/>
9704                         <field reporter:label="From Relation Type" name="type" reporter:datatype="text"/>
9705                         <field reporter:label="Table Name" name="table_name" reporter:datatype="text"/>
9706                         <field reporter:label="Class Name" name="class_name" reporter:datatype="text"/>
9707                         <field reporter:label="Subquery ID" name="subquery" reporter:datatype="link"/>
9708                         <field reporter:label="Function Call ID" name="function_call" reporter:datatype="link"/>
9709                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9710                         <field reporter:label="Parent Relation ID" name="parent_relation" reporter:datatype="link"/>
9711                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9712                         <field reporter:label="Join Type" name="join_type" reporter:datatype="text"/>
9713                         <field reporter:label="On Clause ID" name="on_clause" reporter:datatype="link"/>
9714                 </fields>
9715                 <links>
9716                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9717                         <link field="function_call" reltype="has_a" key="id" map="" class="qxp"/>
9718                         <link field="parent_relation" reltype="has_a" key="id" map="" class="qfr"/>
9719                         <link field="on_clause" reltype="has_a" key="id" map="" class="qxp"/>
9720                 </links>
9721         </class>
9722
9723         <class id="qrc" controller="open-ils.cstore" oils_obj:fieldmapper="query::record_column" oils_persist:tablename="query.record_column" reporter:label="Record Column">
9724                 <fields oils_persist:primary="id" oils_persist:sequence="query.record_column_id_seq">
9725                         <field reporter:label="Record Column ID" name="id" reporter:datatype="id"/>
9726                         <field reporter:label="From Relation ID" name="from_relation" reporter:datatype="link"/>
9727                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9728                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9729                         <field reporter:label="Column Type" name="column_type" reporter:datatype="link"/>
9730                 </fields>
9731                 <links>
9732                         <link field="from_relation" reltype="has_a" key="id" map="" class="qfr"/>
9733                         <link field="column_type" reltype="has_a" key="id" map="" class="qdt"/>
9734                 </links>
9735         </class>
9736
9737         <class id="qsi" controller="open-ils.cstore" oils_obj:fieldmapper="query::select_item" oils_persist:tablename="query.select_item" reporter:label="Select Item">
9738                 <fields oils_persist:primary="id" oils_persist:sequence="query.select_item_id_seq">
9739                         <field reporter:label="Select Item ID" name="id" reporter:datatype="id"/>
9740                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9741                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9742                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9743                         <field reporter:label="Column Alias" name="column_alias" reporter:datatype="text"/>
9744                         <field reporter:label="Is Grouped By" name="grouped_by" reporter:datatype="bool"/>
9745                 </fields>
9746                 <links>
9747                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9748                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9749                 </links>
9750         </class>
9751
9752         <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">
9753                 <fields oils_persist:primary="id" oils_persist:sequence="query.order_by_item_id_seq">
9754                         <field reporter:label="Order By Item ID" name="id" reporter:datatype="id"/>
9755                         <field reporter:label="Stored Query ID" name="stored_query" reporter:datatype="link"/>
9756                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9757                         <field reporter:label="Expression" name="expression" reporter:datatype="link"/>
9758                 </fields>
9759                 <links>
9760                         <link field="stored_query" reltype="has_a" key="id" map="" class="qsq"/>
9761                         <link field="expression" reltype="has_a" key="id" map="" class="qxp"/>
9762                 </links>
9763         </class>
9764
9765         <class id="xbet" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbet" oils_persist:tablename="query.expr_xbet" reporter:label="Between Expression">
9766                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9767                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9768                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9769                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9770                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9771                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9772                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9773                 </fields>
9774                 <links>
9775                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9776                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9777                 </links>
9778         </class>
9779
9780         <class id="xbind" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbind" oils_persist:tablename="query.expr_xbind" reporter:label="Bind Variable Expression">
9781                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9782                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9783                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9784                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9785                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9786                         <field reporter:label="Bind Variable" name="bind_variable" reporter:datatype="link"/>
9787                 </fields>
9788                 <links>
9789                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9790                         <link field="bind_variable" reltype="has_a" key="name" map="" class="qbv"/>
9791                 </links>
9792         </class>
9793
9794         <class id="xbool" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xbool" oils_persist:tablename="query.expr_xbool" reporter:label="Boolean Expression">
9795                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9796                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9797                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9798                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9799                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9800                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9801                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9802                 </fields>
9803                 <links>
9804                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9805                 </links>
9806         </class>
9807
9808         <class id="xcase" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcase" oils_persist:tablename="query.expr_xcase" reporter:label="Case Expression">
9809                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9810                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9811                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9812                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9813                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9814                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9815                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9816                 </fields>
9817                 <links>
9818                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9819                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9820                 </links>
9821         </class>
9822
9823         <class id="xcast" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcast" oils_persist:tablename="query.expr_xcast" reporter:label="Cast Expression">
9824                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9825                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9826                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9827                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9828                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9829                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9830                         <field reporter:label="Cast Type" name="cast_type" reporter:datatype="link"/>
9831                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9832                 </fields>
9833                 <links>
9834                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9835                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9836                         <link field="cast_type" reltype="has_a" key="id" map="" class="qdt"/>
9837                 </links>
9838         </class>
9839
9840         <class id="xcol" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xcol" oils_persist:tablename="query.expr_xcol" reporter:label="Column Expression">
9841                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9842                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9843                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9844                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9845                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9846                         <field reporter:label="Table Alias" name="table_alias" reporter:datatype="text"/>
9847                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9848                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9849                 </fields>
9850                 <links>
9851                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9852                 </links>
9853         </class>
9854
9855         <class id="xex" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xex" oils_persist:tablename="query.expr_xex" reporter:label="Exists Expression">
9856                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9857                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9858                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9859                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9860                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9861                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9862                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9863                 </fields>
9864                 <links>
9865                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9866                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9867                 </links>
9868         </class>
9869
9870         <class id="xfunc" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xfunc" oils_persist:tablename="query.expr_xfunc" reporter:label="Function Expression">
9871                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9872                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9873                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9874                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9875                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9876                         <field reporter:label="Column Name" name="column_name" reporter:datatype="text"/>
9877                         <field reporter:label="Function ID" name="function_id" reporter:datatype="link"/>
9878                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9879                 </fields>
9880                 <links>
9881                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9882                         <link field="function_id" reltype="has_a" key="id" map="" class="qfs"/>
9883                 </links>
9884         </class>
9885
9886         <class id="xin" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xin" oils_persist:tablename="query.expr_xin" reporter:label="In Expression">
9887                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9888                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9889                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9890                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9891                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9892                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9893                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9894                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9895                 </fields>
9896                 <links>
9897                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9898                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9899                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
9900                 </links>
9901         </class>
9902
9903         <class id="xisnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xisnull" oils_persist:tablename="query.expr_xisnull" reporter:label="IS NULL Expression">
9904                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9905                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9906                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9907                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9908                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9909                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9910                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9911                 </fields>
9912                 <links>
9913                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9914                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9915                 </links>
9916         </class>
9917
9918         <class id="xnull" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnull" oils_persist:tablename="query.expr_xnull" reporter:label="Null Expression">
9919                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9920                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9921                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9922                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9923                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9924                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9925                 </fields>
9926                 <links>
9927                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9928                 </links>
9929         </class>
9930
9931         <class id="xnum" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xnum" oils_persist:tablename="query.expr_xnum" reporter:label="Number Expression">
9932                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9933                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9934                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9935                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9936                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9937                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9938                 </fields>
9939                 <links>
9940                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9941                 </links>
9942         </class>
9943
9944         <class id="xop" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xop" oils_persist:tablename="query.expr_xop" reporter:label="Operator Expression">
9945                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9946                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9947                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9948                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9949                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9950                         <field reporter:label="Left Operand" name="left_operand" reporter:datatype="link"/>
9951                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9952                         <field reporter:label="Right Operand" name="right_operand" reporter:datatype="link"/>
9953                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9954                 </fields>
9955                 <links>
9956                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9957                         <link field="left_operand" reltype="has_a" key="id" map="" class="qxp"/>
9958                         <link field="right_operand" reltype="has_a" key="id" map="" class="qxp"/>
9959                 </links>
9960         </class>
9961
9962         <class id="xser" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xser" oils_persist:tablename="query.expr_xser" reporter:label="Operator Expression">
9963                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9964                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9965                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9966                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9967                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9968                         <field reporter:label="Operator" name="operator" reporter:datatype="text"/>
9969                         <field reporter:label="Negate?" name="negate" reporter:datatype="bool"/>
9970                 </fields>
9971                 <links>
9972                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9973                 </links>
9974         </class>
9975
9976         <class id="xstr" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xstr" oils_persist:tablename="query.expr_xstr" reporter:label="String Expression">
9977                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9978                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9979                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9980                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9981                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9982                         <field reporter:label="Literal" name="literal" reporter:datatype="text"/>
9983                 </fields>
9984                 <links>
9985                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9986                 </links>
9987         </class>
9988
9989         <class id="xsubq" controller="open-ils.cstore" oils_obj:fieldmapper="query::expr_xsubq" oils_persist:tablename="query.expr_xsubq" reporter:label="Subquery Expression">
9990                 <fields oils_persist:primary="id" oils_persist:sequence="query.expression_id_seq">
9991                         <field reporter:label="Expression ID" name="id" reporter:datatype="id"/>
9992                         <field reporter:label="Is Parenthesized" name="parenthesize" reporter:datatype="bool"/>
9993                         <field reporter:label="Parent Expression" name="parent_expr" reporter:datatype="link"/>
9994                         <field reporter:label="Sequence Number" name="seq_no" reporter:datatype="int"/>
9995                         <field reporter:label="Subquery" name="subquery" reporter:datatype="link"/>
9996                 </fields>
9997                 <links>
9998                         <link field="parent_expr" reltype="has_a" key="id" map="" class="qxp"/>
9999                         <link field="subquery" reltype="has_a" key="id" map="" class="qsq"/>
10000                 </links>
10001         </class>
10002
10003         <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">
10004                 <fields oils_persist:primary="id">
10005                         <field reporter:label="Temp ID" name="id" reporter:datatype="id"/>
10006                         <field reporter:label="Type" name="ptype" reporter:datatype="link"/>
10007                         <field reporter:label="Subfield" name="subfield" reporter:datatype="link"/>
10008                         <field reporter:label="Value" name="value" reporter:datatype="link"/>
10009                         <field reporter:label="Record" name="record" reporter:datatype="link"/>
10010                 </fields>
10011                 <links>
10012                         <link field="ptype" reltype="has_a" key="id" map="" class="cmpctm"/>
10013                         <link field="subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10014                         <link field="value" reltype="has_a" key="id" map="" class="cmpcvm"/>
10015                         <link field="record" reltype="has_a" key="id" map="" class="bre"/>
10016                 </links>
10017         </class>
10018
10019         <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">
10020                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_ff_pos_map_id_seq">
10021                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10022                         <field reporter:label="Fixed Field" name="fixed_field" reporter:datatype="text"/>
10023                         <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10024                         <field reporter:label="Record Type" name="rec_type" reporter:datatype="text"/>
10025                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10026                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10027                         <field reporter:label="Default Value" name="default_val" reporter:datatype="text"/>
10028                 </fields>
10029                 <links/>
10030                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10031                         <actions>
10032                                 <retrieve/>
10033                         </actions>
10034                 </permacrud>
10035         </class>
10036
10037         <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">
10038                 <fields oils_persist:primary="ptype_key">
10039                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="id"/>
10040                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10041                 </fields>
10042                 <links/>
10043                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10044                         <actions>
10045                                 <retrieve/>
10046                         </actions>
10047                 </permacrud>
10048         </class>
10049
10050         <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">
10051                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_subfield_map_id_seq">
10052                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10053                         <field reporter:label="Type Key" name="ptype_key" reporter:datatype="link"/>
10054                         <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10055                         <field reporter:label="Start Postion" name="start_pos" reporter:datatype="int"/>
10056                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
10057                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10058                 </fields>
10059                 <links>
10060                         <link field="ptype_key" reltype="has_a" key="id" map="" class="cmpctm"/>
10061                 </links>
10062                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10063                         <actions>
10064                                 <retrieve/>
10065                         </actions>
10066                 </permacrud>
10067         </class>
10068
10069         <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">
10070                 <fields oils_persist:primary="id" oils_persist:sequence="config.marc21_physical_characteristic_value_map_id_seq">
10071                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10072                         <field reporter:label="Value" name="value" reporter:datatype="text"/>
10073                         <field reporter:label="Subfield" name="ptype_subfield" reporter:datatype="link"/>
10074                         <field reporter:label="Label" name="label" reporter:datatype="text"/>
10075                 </fields>
10076                 <links>
10077                         <link field="ptype_subfield" reltype="has_a" key="id" map="" class="cmpcsm"/>
10078                 </links>
10079                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10080                         <actions>
10081                                 <retrieve/>
10082                         </actions>
10083                 </permacrud>
10084         </class>
10085
10086     <class
10087         id="uvs"
10088         controller="open-ils.cstore open-ils.pcrud"
10089         oils_obj:fieldmapper="url_verify::session"
10090         oils_persist:tablename="url_verify.session"
10091         reporter:label="URL Verification Session"
10092     >
10093         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.session_id_seq">
10094             <field reporter:label="Session ID" name="id" reporter:datatype="id"/>
10095             <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true"/>
10096                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" oils_obj:required="true"/>
10097             <field reporter:label="Creator" name="creator" reporter:datatype="link" oils_obj:required="true"/>
10098             <field reporter:label="Record Container" name="container" reporter:datatype="link" oils_obj:required="true"/>
10099             <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10100             <field reporter:label="Search Constraints" name="search" reporter:datatype="text" oils_obj:required="true"/>
10101             <field reporter:label="URL Selectors" name="selectors" reporter:datatype="link" oils_persist:virtual="true"/>
10102             <field reporter:label="Verification Attempts" name="attempts" reporter:datatype="link" oils_persist:virtual="true"/>
10103         </fields>
10104
10105         <links>
10106             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10107             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10108             <link field="container" reltype="has_a" key="id" map="" class="cbreb"/>
10109             <link field="selectors" reltype="has_many" key="session" map="" class="uvus"/>
10110             <link field="attempts" reltype="has_many" key="session" map="" class="uvva"/>
10111         </links>
10112
10113         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10114             <actions>
10115                 <retrieve permission="URL_VERIFY" context_field="owning_lib"/>
10116             </actions>
10117         </permacrud>
10118
10119     </class>
10120
10121     <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">
10122         <oils_persist:source_definition>
10123             SELECT
10124                 cbrebi.id AS id,  -- so we can have a pkey in our view
10125                 uvs.id AS session,
10126                 uvs.owning_lib,
10127                 cbrebi.target_biblio_record_entry
10128             FROM url_verify.session uvs
10129             JOIN container.biblio_record_entry_bucket cbreb
10130                 ON (uvs.container = cbreb.id)
10131             JOIN container.biblio_record_entry_bucket_item cbrebi
10132                 ON (cbrebi.bucket = cbreb.id)
10133         </oils_persist:source_definition>
10134         <fields oils_persist:primary="id" oils_persist:sequence="container.biblio_record_entry_bucket_item_id_seq">
10135             <field reporter:label="Bucket Item ID" name="id" reporter:datatype="id" />
10136             <field reporter:label="Session" name="session" reporter:datatype="link" />
10137             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit" />
10138             <field reporter:label="Target Biblio Record Entry" name="target_biblio_record_entry" reporter:datatype="link" />
10139         </fields>
10140         <links>
10141             <link field="target_biblio_record_entry" reltype="has_a" key="id" map="" class="bre" />
10142             <link field="session" reltype="has_a" key="id" map="" class="uvs" />
10143             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou" />
10144         </links>
10145         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10146             <actions>
10147                 <retrieve permission="URL_VERIFY" context_field="owning_lib" />
10148             </actions>
10149         </permacrud>
10150     </class>
10151
10152     <class
10153         id="uvus"
10154         controller="open-ils.cstore open-ils.pcrud"
10155         oils_obj:fieldmapper="url_verify::url_selector"
10156         oils_persist:tablename="url_verify.url_selector"
10157         reporter:label="URL Verification URL Selector"
10158     >
10159         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_selector_id_seq">
10160             <field reporter:label="URL Selector ID" name="id" reporter:datatype="id"/>
10161             <field reporter:label="XPath" name="xpath" reporter:datatype="text" oils_obj:required="true"/>
10162                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10163             <field reporter:label="URLs" name="urls" reporter:datatype="link" oils_persist:virtual="true"/>
10164         </fields>
10165
10166         <links>
10167             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10168             <link field="urls" reltype="has_many" key="id" map="" class="uvu"/>
10169         </links>
10170
10171         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10172             <actions>
10173                 <create permission="URL_VERIFY">
10174                     <context link="session" field="owning_lib"/>
10175                 </create>
10176                 <retrieve permission="URL_VERIFY">
10177                     <context link="session" field="owning_lib"/>
10178                 </retrieve>
10179                 <update permission="URL_VERIFY">
10180                     <context link="session" field="owning_lib"/>
10181                 </update>
10182                 <delete permission="URL_VERIFY">
10183                     <context link="session" field="owning_lib"/>
10184                 </delete>
10185             </actions>
10186         </permacrud>
10187
10188     </class>
10189
10190     <class
10191         id="uvu"
10192         controller="open-ils.cstore open-ils.pcrud"
10193         oils_obj:fieldmapper="url_verify::url"
10194         oils_persist:tablename="url_verify.url"
10195         reporter:label="URL Verification URL"
10196     >
10197         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_id_seq">
10198             <field reporter:label="URL ID" name="id" reporter:datatype="id"/>
10199                         <field reporter:label="Redirected From" name="redirect_from" reporter:datatype="link"/>
10200                         <field reporter:label="Container Item" name="item" reporter:datatype="link" oils_obj:required="true"/>
10201                         <field reporter:label="Session" name="session" reporter:datatype="link" oils_obj:required="true"/>
10202                         <field reporter:label="URL Selector" name="url_selector" reporter:datatype="link"/>
10203             <field reporter:label="Tag" name="tag" reporter:datatype="text"/>
10204             <field reporter:label="Subfield" name="subfield" reporter:datatype="text"/>
10205             <field reporter:label="Ordinal Position" name="ord" reporter:datatype="int"/>
10206             <field reporter:label="URL" name="full_url" reporter:datatype="text"/>
10207             <field reporter:label="Scheme" name="scheme" reporter:datatype="text"/>
10208             <field reporter:label="Host" name="host" reporter:datatype="text"/>
10209             <field reporter:label="Domain" name="domain" reporter:datatype="text"/>
10210             <field reporter:label="TLD" name="tld" reporter:datatype="text"/>
10211             <field reporter:label="Path" name="path" reporter:datatype="text"/>
10212             <field reporter:label="Page" name="page" reporter:datatype="text"/>
10213             <field reporter:label="Query" name="query" reporter:datatype="text"/>
10214             <field reporter:label="Fragment" name="fragment" reporter:datatype="text"/>
10215             <field reporter:label="Verifications" name="verifications" reporter:datatype="link" oils_persist:virtual="true" />
10216         </fields>
10217
10218         <links>
10219             <link field="redirect_from" reltype="has_a" key="id" map="" class="uvu"/>
10220             <link field="item" reltype="has_a" key="id" map="" class="uvsbrem" />
10221             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10222             <link field="url_selector" reltype="has_a" key="id" map="" class="uvus"/>
10223             <link field="verifications" reltype="has_many" key="url" map="" class="uvuv"/>
10224         </links>
10225
10226         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10227             <actions>
10228                 <create permission="URL_VERIFY">
10229                     <context link="session" field="owning_lib"/>
10230                 </create>
10231                 <retrieve permission="URL_VERIFY">
10232                     <context link="session" field="owning_lib"/>
10233                 </retrieve>
10234                 <update permission="URL_VERIFY">
10235                     <context link="session" field="owning_lib"/>
10236                 </update>
10237                 <delete permission="URL_VERIFY">
10238                     <context link="session" field="owning_lib"/>
10239                 </delete>
10240             </actions>
10241         </permacrud>
10242
10243     </class>
10244
10245     <class
10246         id="uvva"
10247         controller="open-ils.cstore open-ils.pcrud"
10248         oils_obj:fieldmapper="url_verify::verification_attempt"
10249         oils_persist:tablename="url_verify.verification_attempt"
10250         reporter:label="URL Verification Attempt"
10251     >
10252         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.verification_attempt_id_seq">
10253             <field reporter:label="Attempt ID" name="id" reporter:datatype="id"/>
10254                         <field reporter:label="User" name="usr" reporter:datatype="link"/>
10255                         <field reporter:label="Session" name="session" reporter:datatype="link"/>
10256             <field reporter:label="Start Time" name="start_time" reporter:datatype="timestamp"/>
10257             <field reporter:label="Finish Time" name="finish_time" reporter:datatype="timestamp"/>
10258         </fields>
10259
10260         <links>
10261             <link field="session" reltype="has_a" key="id" map="" class="uvs"/>
10262             <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10263         </links>
10264
10265         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10266             <actions>
10267                 <create permission="URL_VERIFY">
10268                     <context link="session" field="owning_lib"/>
10269                 </create>
10270                 <retrieve permission="URL_VERIFY">
10271                     <context link="session" field="owning_lib"/>
10272                 </retrieve>
10273                 <update permission="URL_VERIFY">
10274                     <context link="session" field="owning_lib"/>
10275                 </update>
10276                 <delete permission="URL_VERIFY">
10277                     <context link="session" field="owning_lib"/>
10278                 </delete>
10279             </actions>
10280         </permacrud>
10281
10282     </class>
10283
10284     <class
10285         id="uvuv"
10286         controller="open-ils.cstore open-ils.pcrud"
10287         oils_obj:fieldmapper="url_verify::url_verification"
10288         oils_persist:tablename="url_verify.url_verification"
10289         reporter:label="URL Verification"
10290     >
10291         <fields oils_persist:primary="id" oils_persist:sequence="url_verify.url_verification_id_seq">
10292             <field reporter:label="Verification ID" name="id" reporter:datatype="id"/>
10293                         <field reporter:label="URL" name="url" reporter:datatype="link"/>
10294                         <field reporter:label="Attempt" name="attempt" reporter:datatype="link"/>
10295             <field reporter:label="Request Time" name="req_time" reporter:datatype="timestamp"/>
10296             <field reporter:label="Result Time" name="res_time" reporter:datatype="timestamp"/>
10297             <field reporter:label="Result Code" name="res_code" reporter:datatype="int"/>
10298             <field reporter:label="Result Text" name="res_text" reporter:datatype="text"/>
10299                         <field reporter:label="Redirected To" name="redirect_to" reporter:datatype="link"/>
10300         </fields>
10301
10302         <links>
10303             <link field="url" reltype="has_a" key="id" map="" class="uvu"/>
10304             <link field="attempt" reltype="has_a" key="id" map="" class="uvva"/>
10305             <link field="redirect_to" reltype="has_a" key="id" map="" class="uvu"/>
10306         </links>
10307
10308         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10309             <actions>
10310                 <create permission="URL_VERIFY">
10311                     <context link="attempt" jump="session" field="owning_lib"/>
10312                 </create>
10313                 <retrieve permission="URL_VERIFY">
10314                     <context link="attempt" jump="session" field="owning_lib"/>
10315                 </retrieve>
10316                 <update permission="URL_VERIFY">
10317                     <context link="attempt" jump="session" field="owning_lib"/>
10318                 </update>
10319                 <delete permission="URL_VERIFY">
10320                     <context link="attempt" jump="session" field="owning_lib"/>
10321                 </delete>
10322             </actions>
10323         </permacrud>
10324
10325     </class>
10326
10327         <class
10328                 id="cfdi"
10329                 controller="open-ils.cstore open-ils.pcrud"
10330                 oils_obj:fieldmapper="config::filter_dialog_interface"
10331                 oils_persist:tablename="config.filter_dialog_interface"
10332                 reporter:label="FilterDialog Interface">
10333                 <fields oils_persist:primary="key" oils_persist:sequence="config.filter_dialog_interface_pkey">
10334                         <field reporter:label="Interface Key" name="key" reporter:datatype="text" />
10335                         <field reporter:label="Description" name="description" reporter:datatype="text" />
10336                 </fields>
10337                 <links>
10338                         <link field="filter_sets" reltype="has_many" key="interface" map="" class="cfdfs"/>
10339                 </links>
10340                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10341                         <actions>
10342                                 <retrieve />
10343                         </actions>
10344                 </permacrud>
10345         </class>
10346
10347         <class
10348                 id="cfdfs"
10349                 controller="open-ils.cstore open-ils.pcrud"
10350                 oils_obj:fieldmapper="config::filter_dialog_filter_set"
10351                 oils_persist:tablename="config.filter_dialog_filter_set"
10352                 reporter:label="FilterDialog Filter Set">
10353                 <fields oils_persist:primary="id" oils_persist:sequence="config.filter_dialog_filter_set_id_seq">
10354                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
10355                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
10356                         <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
10357                         <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
10358                         <field reporter:label="Interface" name="interface" reporter:datatype="link"/>
10359                         <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
10360                         <field reporter:label="Filters" name="filters" reporter:datatype="text"/>
10361                 </fields>
10362                 <links>
10363                         <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
10364                         <link field="creator" reltype="has_a" key="id" map="" class="au"/>
10365                         <link field="interface" reltype="has_a" key="key" map="" class="cfdi"/>
10366                 </links>
10367                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10368                         <actions>
10369                                 <create permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10370                                 <retrieve permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10371                                 <update permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10372                                 <delete permission="SAVED_FILTER_DIALOG_FILTERS" context_field="owning_lib"/>
10373                         </actions>
10374                 </permacrud>
10375
10376         </class>
10377
10378         <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">
10379                 <fields oils_persist:primary="code">
10380                         <field reporter:label="Code" name="code" reporter:datatype="id"/>
10381                         <field reporter:label="Type Value" name="type_val" reporter:datatype="text"/>
10382                         <field reporter:label="BLvl Value" name="blvl_val" reporter:datatype="text"/>
10383                 </fields>
10384                 <links/>
10385                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10386                         <actions>
10387                                 <retrieve/>
10388                         </actions>
10389                 </permacrud>
10390         </class>
10391
10392         <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">
10393                 <oils_persist:source_definition>
10394
10395             SELECT  b.id,
10396                     MAX(dcp.edit_date) AS last_delete_date
10397              FROM   biblio.record_entry b
10398                     JOIN asset.call_number cn ON (cn.record = b.id)
10399                     JOIN asset.copy dcp ON (cn.id = dcp.call_number)
10400              WHERE  NOT b.deleted
10401              GROUP BY b.id
10402              HAVING SUM( CASE WHEN NOT dcp.deleted THEN 1 ELSE 0 END) = 0 
10403
10404                 </oils_persist:source_definition>
10405                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10406                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10407                         <field reporter:label="Delete Date/Time" name="last_delete_date" reporter:datatype="timestamp"/>
10408                 </fields>
10409                 <links>
10410                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10411                 </links>
10412                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10413                         <actions>
10414                                 <retrieve/>
10415                         </actions>
10416                 </permacrud>
10417         </class>
10418
10419         <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">
10420                 <oils_persist:source_definition>
10421
10422             -- -- 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.
10423             -- -- 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
10424             -- -- may not.
10425             -- SELECT
10426             --     bre.id AS "bib_id",
10427             --     COALESCE( z.copy_count, 0 ) AS "copy_count",
10428             --     COALESCE( z.hold_count, 0 ) AS "hold_count",
10429             --     COALESCE( z.copy_hold_ratio, 0 ) AS "hold_copy_ratio"
10430             -- FROM (
10431                 SELECT
10432                     y.bre AS "id",
10433                     COALESCE( x.copy_count, 0 ) AS "copy_count",
10434                     y.hold_count AS "hold_count",
10435                     (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"
10436                 FROM (
10437                         SELECT
10438                             (SELECT bib_record FROM reporter.hold_request_record r WHERE r.id = h.id LIMIT 1) AS "bre",
10439                             COUNT(*) AS "hold_count"
10440                         FROM action.hold_request h
10441                         WHERE
10442                             cancel_time IS NULL
10443                             AND fulfillment_time IS NULL
10444                             -- AND NOT frozen  -- a frozen hold is still a desired hold, eh?
10445                         GROUP BY 1
10446                     )y LEFT JOIN (
10447                         SELECT 
10448                             (SELECT id
10449                                 FROM biblio.record_entry 
10450                                 WHERE id = (SELECT record FROM asset.call_number WHERE id = call_number and deleted is false)
10451                             ) AS "bre", 
10452                             COUNT(*) AS "copy_count"
10453                         FROM asset.copy
10454                             JOIN asset.copy_location loc ON (copy.location = loc.id AND loc.holdable)
10455                         WHERE copy.holdable 
10456                             AND NOT copy.deleted 
10457                             AND copy.status IN ( SELECT id FROM config.copy_status WHERE holdable ) 
10458                         GROUP BY 1
10459                     )x ON x.bre = y.bre
10460                 -- )z RIGHT JOIN (
10461                 --     SELECT id
10462                 --     FROM biblio.record_entry
10463                 --     WHERE NOT deleted
10464                 -- )bre ON (z.bib_id = bre.id)
10465                 
10466
10467                 </oils_persist:source_definition>
10468                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10469                         <field reporter:label="Record ID" name="id" reporter:datatype="id"/>
10470                         <field reporter:label="Holdable Copy Count" name="copy_count" reporter:datatype="int"/>
10471                         <field reporter:label="Active Holds" name="hold_count" reporter:datatype="int"/>
10472                         <field reporter:label="Hold/Copy Ratio" name="hold_copy_ratio" reporter:datatype="float"/>
10473                 </fields>
10474                 <links>
10475                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10476                 </links>
10477                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10478                         <actions>
10479                                 <retrieve/>
10480                         </actions>
10481                 </permacrud>
10482         </class>
10483
10484         <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">
10485                 <oils_persist:source_definition>
10486             SELECT *,
10487                 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,
10488                 CASE WHEN copy_count_everywhere = 0 THEN 'Infinity'::FLOAT ELSE holds_everywhere::FLOAT/copy_count_everywhere END AS everywhere_ratio
10489             FROM
10490                 (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
10491                     FROM
10492                         action.hold_request ahr
10493                         JOIN reporter.hold_request_record rhrr USING (id)
10494                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10495                         LEFT JOIN asset.copy ac ON (ahcm.target_copy = ac.id AND ahr.pickup_lib = ac.circ_lib)
10496                     WHERE
10497                         ahr.cancel_time IS NULL
10498                         AND ahr.fulfillment_time IS NULL
10499                     GROUP BY bib_record, pickup_lib
10500                 )x
10501                 JOIN
10502                 (SELECT bib_record as id, count(DISTINCT ahr.id) AS holds_everywhere, COALESCE(count(DISTINCT target_copy),0) as copy_count_everywhere
10503                     FROM
10504                         action.hold_request ahr
10505                         JOIN reporter.hold_request_record rhrr USING (id)
10506                         LEFT JOIN action.hold_copy_map ahcm ON (ahr.id = ahcm.hold)
10507                     WHERE
10508                         ahr.cancel_time IS NULL
10509                         AND ahr.fulfillment_time IS NULL
10510                     GROUP BY bib_record
10511                 )y
10512                 USING (id)
10513                 </oils_persist:source_definition>
10514                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10515                         <field reporter:label="Record ID" name="id" reporter:datatype="link"/>
10516                         <field reporter:label="Pickup Library" name="pickup_lib" reporter:datatype="org_unit"/>
10517                         <field reporter:label="Active Holds at Pickup Library" name="holds_at_pickup_library" reporter:datatype="int"/>
10518                         <field reporter:label="Holdable Copy Count at Pickup Library" name="copy_count_at_pickup_library" reporter:datatype="int"/>
10519                         <field reporter:label="Active Holds Everywhere" name="holds_everywhere" reporter:datatype="int"/>
10520                         <field reporter:label="Holdable Copy Count Everywhere" name="copy_count_everywhere" reporter:datatype="int"/>
10521                         <field reporter:label="Hold/Copy Ratio at Pickup Library" name="pickup_library_ratio" reporter:datatype="float"/>
10522                         <field reporter:label="Hold/Copy Ratio Everywhere" name="everywhere_ratio" reporter:datatype="float"/>
10523                 </fields>
10524                 <links>
10525                         <link field="id" reltype="has_a" key="id" map="" class="bre"/>
10526                         <link field="pickup_lib" reltype="has_a" key="id" map="" class="aou"/>
10527                 </links>
10528                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10529                         <actions>
10530                                 <retrieve/>
10531                         </actions>
10532                 </permacrud>
10533         </class>
10534
10535         <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">
10536                 <oils_persist:source_definition>
10537             SELECT
10538                 ac.id,
10539                 COALESCE(MAX(actac.xact_start), ac.create_date) AS last_circ_or_create,
10540                 MAX(actac.xact_start) AS last_circ
10541             FROM asset.copy ac
10542                  LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10543             GROUP BY ac.id
10544
10545             -- Alternate version, say if you have migrated last checkout information in extend_reporter.legacy_circ_timestamp:
10546             --SELECT
10547             --    ac.id,
10548             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts, ac.create_date) AS last_circ_or_create,
10549             --    GREATEST(MAX(actac.xact_start), erlct.last_cko_ts) AS last_circ
10550             --FROM asset.copy ac
10551             --     LEFT JOIN action.all_circulation actac ON ac.id = actac.target_copy
10552             --     LEFT JOIN extend_reporter.legacy_circ_timestamp erlct ON ac.id = erlct.id
10553             --GROUP BY ac.id, ac.create_date, erlct.last_cko_ts
10554                 </oils_persist:source_definition>
10555                 <fields oils_persist:primary="id" oils_persist:sequence="biblio.record_entry">
10556                         <field reporter:label="Copy ID" name="id" reporter:datatype="link"/>
10557                         <field reporter:label="Last Circulation or Creation Date" name="last_circ_or_create" reporter:datatype="timestamp"/>
10558                         <field reporter:label="Last Circulation Date" name="last_circ" reporter:datatype="timestamp"/>
10559                 </fields>
10560                 <links>
10561                         <link field="id" reltype="has_a" key="id" map="" class="acp"/>
10562                 </links>
10563                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10564                         <actions>
10565                                 <retrieve/>
10566                         </actions>
10567                 </permacrud>
10568         </class>
10569
10570         <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">
10571                 <fields oils_persist:primary="id">
10572                         <field reporter:label="Text Search Config" reporter:selector="name" reporter:datatype="text" name="id"/>
10573                         <field reporter:label="Text Search Config Name" reporter:datatype="text" name="name"/>
10574                 </fields>
10575                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10576                         <actions>
10577                                 <retrieve/>
10578                         </actions>
10579                 </permacrud>
10580         </class>
10581
10582         <class id="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">
10583                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_class_ts_map_id_seq">
10584                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10585                         <field reporter:label="Metabib Class" reporter:datatype="text" name="field_class"/>
10586                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10587                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10588                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10589                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10590                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10591                         <field reporter:label="Always Apply?" reporter:datatype="bool" name="always"/>
10592                 </fields>
10593                 <links>
10594                         <link field="field_class" reltype="has_a" key="name" map="" class="cmc"/>
10595                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10596                 </links>
10597                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10598                         <actions>
10599                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10600                                 <retrieve/>
10601                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10602                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10603                         </actions>
10604                 </permacrud>
10605         </class>
10606
10607         <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">
10608                 <fields oils_persist:primary="id" oils_persist:sequence="config.metabib_field_ts_map_id_seq">
10609                         <field reporter:label="Map ID" reporter:datatype="id" name="id"/>
10610                         <field reporter:label="Metabib Field" reporter:datatype="text" name="metabib_field"/>
10611                         <field reporter:label="Text Search Config" reporter:datatype="text" name="ts_config"/>
10612                         <field reporter:label="Active?" reporter:datatype="bool" name="active"/>
10613                         <field reporter:label="Index Weight" reporter:datatype="text" name="index_weight"/>
10614                         <field reporter:label="Index Language" reporter:datatype="text" name="index_lang"/>
10615                         <field reporter:label="Search Language" reporter:datatype="text" name="search_lang"/>
10616                 </fields>
10617                 <links>
10618                         <link field="metabib_field" reltype="has_a" key="id" map="" class="cmf"/>
10619                         <link field="ts_config" reltype="has_a" key="id" map="" class="ctcl"/>
10620                 </links>
10621                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10622                         <actions>
10623                                 <create permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10624                                 <retrieve/>
10625                                 <update permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10626                                 <delete permission="ADMIN_INDEX_NORMALIZER" global_required="true"/>
10627                         </actions>
10628                 </permacrud>
10629         </class>
10630
10631
10632         <!-- ********************************************************************************************************************* -->
10633         <!-- What follows is a set of example extensions that are useful for PINES.  Comment out or remove if you don't want them. -->
10634         <!-- ********************************************************************************************************************* -->
10635         <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">
10636                 <fields oils_persist:primary="id">
10637                         <field reporter:label="Circulation" name="id" reporter:datatype="id" />
10638                         <field reporter:label="Library Circulation Location Short (Policy) Name" name="circ_lib" reporter:datatype="text"/>
10639                         <field reporter:label="Library Circulation Location Link" name="circ_lib_id" reporter:datatype="org_unit"/>
10640                         <field reporter:label="Circulation Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10641                         <field reporter:label="Circulation Type" name="circ_type" reporter:datatype="text"/>
10642                         <field reporter:label="Copy Link" name="copy_id" reporter:datatype="link"/>
10643                         <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10644                         <field reporter:label="Owning Library Short (Policy) Name" name="owning_lib_name" reporter:datatype="text"/>
10645                         <field reporter:label="Item Language" name="language" reporter:datatype="text"/>
10646                         <field reporter:label="Literary Form" name="lit_form" reporter:datatype="text"/>
10647                         <field reporter:label="MARC Form" name="item_form" reporter:datatype="text"/>
10648                         <field reporter:label="MARC Type" name="item_type" reporter:datatype="text"/>
10649                         <field reporter:label="Shelving Location" name="shelving_location" reporter:datatype="text"/>
10650                         <field reporter:label="Patron Profile Group" name="profile_group" reporter:datatype="text"/>
10651                         <field reporter:label="Patron Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10652                         <field reporter:label="Call Number Link" name="call_number" reporter:datatype="link"/>
10653                         <field reporter:label="Call Number Label" name="call_number_label" reporter:datatype="text"/>
10654                         <field reporter:label="Call Number Dewey/Prefix" name="dewey" reporter:datatype="text"/>
10655                         <field reporter:label="Patron Link" name="patron_id" reporter:datatype="link"/>
10656                         <field reporter:label="Patron Home Library Link" name="patron_home_lib" reporter:datatype="link"/>
10657                         <field reporter:label="Patron Home Library Short (Policy) Name" name="patron_home_lib_shortname" reporter:datatype="text"/>
10658                         <field reporter:label="Patron County" name="patron_county" reporter:datatype="text"/>
10659                         <field reporter:label="Patron City" name="patron_city" reporter:datatype="text"/>
10660                         <field reporter:label="Patron ZIP Code" name="patron_zip" reporter:datatype="text"/>
10661                         <field reporter:label="Legacy CAT1 Link" name="stat_cat_1" reporter:datatype="link"/>
10662                         <field reporter:label="Legacy CAT2 Link" name="stat_cat_2" reporter:datatype="link"/>
10663                         <field reporter:label="Dewey Range - Tens" name="dewey_range_tens" reporter:datatype="text"/>
10664                         <field reporter:label="Dewey Range - Hundreds" name="dewey_range_hundreds" reporter:datatype="text"/>
10665                         <field reporter:label="Dewey Block - Tens" name="dewey_block_tens" reporter:datatype="text"/>
10666                         <field reporter:label="Dewey Block - Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10667                         <field reporter:label="Legacy CAT1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10668                         <field reporter:label="Legacy CAT2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
10669                 </fields>
10670                 <links>
10671                         <link field="id" reltype="has_a" key="id" map="" class="circ"/>
10672                         <link field="copy_id" reltype="has_a" key="id" map="" class="acp"/>
10673                         <link field="patron_id" reltype="has_a" key="id" map="" class="au"/>
10674                         <link field="circ_lib_id" reltype="has_a" key="id" map="" class="aou"/>
10675                         <link field="call_number" reltype="has_a" key="id" map="" class="acn"/>
10676                         <link field="patron_home_lib" reltype="has_a" key="id" map="" class="aou"/>
10677                         <link field="stat_cat_1" reltype="has_a" key="id" map="" class="rsce1"/>
10678                         <link field="stat_cat_2" reltype="has_a" key="id" map="" class="rsce2"/>
10679                 </links>
10680         </class>
10681
10682         <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">
10683                 <fields oils_persist:primary="id">
10684                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10685                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10686                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10687                 </fields>
10688                 <links>
10689                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10690                 </links>
10691         </class>
10692
10693         <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">
10694                 <fields oils_persist:primary="id">
10695                         <field reporter:label="Entry ID" name="id" reporter:selector="value" reporter:datatype="id" />
10696                         <field reporter:label="Entry Owner" name="owner" reporter:datatype="link"/>
10697                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
10698                 </fields>
10699                 <links>
10700                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
10701                 </links>
10702         </class>
10703
10704         <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">
10705                 <fields oils_persist:primary="id">
10706                         <field reporter:label="Transaction ID" name="id" reporter:datatype="id" />
10707
10708                         <field reporter:label="Billing Location Short (Policy) Name" name="billing_location_shortname" reporter:datatype="text"/>
10709                         <field reporter:label="Billing Location Name" name="billing_location_name" reporter:datatype="text"/>
10710                         <field reporter:label="Billing Location Link" name="billing_location" reporter:datatype="org_unit"/>
10711
10712                         <field reporter:label="User Home Library Short (Policy) Name" name="usr_home_ou_shortname" reporter:datatype="text"/>
10713                         <field reporter:label="User Home Library Name" name="usr_home_ou_name" reporter:datatype="text"/>
10714                         <field reporter:label="User Home Library Link" name="usr_home_ou" reporter:datatype="org_unit"/>
10715
10716                         <field reporter:label="User Barcode" name="barcode" reporter:datatype="text"/>
10717                         <field reporter:label="User Link" name="usr" reporter:datatype="link"/>
10718
10719                         <field reporter:label="Transaction Start Date/Time" name="xact_start" reporter:datatype="timestamp"/>
10720                         <field reporter:label="Transaction End Date/Time" name="xact_finish" reporter:datatype="timestamp"/>
10721                         <field reporter:label="Transaction Type" name="xact_type" reporter:datatype="text"/>
10722
10723                         <field reporter:label="Total Paid" name="total_paid" reporter:datatype="money"/>
10724                         <field reporter:label="Total Billed" name="total_owed" reporter:datatype="money"/>
10725
10726                         <field reporter:label="Last Payment Date/Time" name="last_payment_ts" reporter:datatype="timestamp"/>
10727                         <field reporter:label="Last Payment Note" name="last_payment_note" reporter:datatype="text"/>
10728                         <field reporter:label="Last Payment Type" name="last_payment_type" reporter:datatype="text"/>
10729
10730                         <field reporter:label="Last Billing Date/Time" name="last_billing_ts" reporter:datatype="timestamp"/>
10731                         <field reporter:label="Last Billing Note" name="last_billing_note" reporter:datatype="text"/>
10732                         <field reporter:label="Last Billing Type" name="last_billing_type" reporter:datatype="text"/>
10733
10734                         <field reporter:label="User Age Demographic" name="demographic_general_division" reporter:datatype="text"/>
10735                         <field reporter:label="User County" name="patron_county" reporter:datatype="text"/>
10736                         <field reporter:label="User City" name="patron_city" reporter:datatype="text"/>
10737                         <field reporter:label="User ZIP Code" name="patron_zip" reporter:datatype="text"/>
10738
10739                         <field reporter:label="Balance Owed" name="balance_owed" reporter:datatype="money"/>
10740                         <field reporter:label="User Profile Group" name="profile_group" reporter:datatype="text"/>
10741
10742                 </fields>
10743                 <links>
10744                         <link field="id" reltype="has_a" key="id" map="" class="mbt"/>
10745                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10746                         <link field="billing_location" reltype="has_a" key="id" map="" class="aou"/>
10747                         <link field="usr_home_ou" reltype="has_a" key="id" map="" class="aou"/>
10748                 </links>
10749         </class>
10750
10751         <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">
10752                 <oils_persist:source_definition>
10753
10754             SELECT
10755                 po.ordering_agency AS ordering_agency,
10756                 po.id AS purchase_order,
10757                 li.id AS lineitem,
10758                 lid.id AS lineitem_detail,
10759                 cpa.id AS claim_policy_action
10760             FROM
10761                 acq.lineitem_detail lid
10762                 JOIN acq.lineitem li ON (li.id = lid.lineitem)
10763                 JOIN acq.purchase_order po ON (po.id = li.purchase_order)
10764                 JOIN acq.claim_policy cp ON (li.claim_policy = cp.id)
10765                 JOIN acq.claim_policy_action cpa ON (
10766                     cpa.claim_policy = cp.id
10767
10768                     -- we only care about claim policy actions whose claim
10769                     -- interval we'd reached or exceeded
10770                     AND (NOW() - cpa.action_interval) &gt; po.order_date
10771
10772                     -- filter out all claim policy actions where claim events
10773                     -- have occurred on or after the action's action_interval
10774                     AND NOT EXISTS (
10775                         SELECT 1
10776                         FROM
10777                             acq.claim_event evt
10778                             JOIN acq.claim claim ON (
10779                                 claim.id = evt.claim
10780                                 AND claim.lineitem_detail = lid.id
10781                             )
10782                         WHERE
10783                             evt.event_date &gt;= (po.order_date + cpa.action_interval)
10784                     )
10785                 )
10786             WHERE
10787                 lid.cancel_reason IS NULL
10788                 AND li.cancel_reason IS NULL -- belt/suspenders
10789                 AND po.cancel_reason IS NULL -- belt/suspenders
10790                 AND lid.recv_time IS NULL
10791                 AND po.state = 'on-order'
10792             ORDER BY 1, 2, 3, 4, 5
10793
10794                 </oils_persist:source_definition>
10795                 <fields>
10796                         <field reporter:label="Ordering Agency" name="ordering_agency" reporter:datatype="link"/>
10797                         <field reporter:label="Purchase Order" name="purchase_order" reporter:datatype="link"/>
10798                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10799                         <field reporter:label="Lineitem Detail" name="lineitem_detail" reporter:datatype="link"/>
10800                         <field reporter:label="Claim Policy Action" name="claim_policy_action" reporter:datatype="link"/>
10801                 </fields>
10802                 <links>
10803                         <link field="ordering_agency" reltype="has_a" key="id" map="" class="aou"/>
10804                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo"/>
10805                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10806                         <link field="lineitem_detail" reltype="has_a" key="id" map="" class="acqlid"/>
10807                         <link field="claim_policy_action" reltype="has_a" key="id" map="" class="acqclpa"/>
10808                 </links>
10809         </class>
10810         <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">
10811                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10812                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10813                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10814                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10815                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10816                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10817                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10818                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10819                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10820                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10821                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10822                 </fields>
10823                 <links>
10824                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10825                 </links>
10826     </class>
10827         <class id="acqlisumi" controller="open-ils.cstore" oils_obj:fieldmapper="acq::lineitem_summary_invoiceable" oils_persist:readonly="true" reporter:label="Invoiceable Lineitem Summary">
10828                 <oils_persist:source_definition>
10829             SELECT * FROM acq.lineitem_summary 
10830                                 WHERE item_count > (invoice_count + cancel_count)
10831         </oils_persist:source_definition>
10832                 <fields oils_persist:primary="lineitem" oils_persist:sequence="acq.lineitem_id_seq">
10833                         <field reporter:label="Lineitem" name="lineitem" reporter:datatype="link"/>
10834                         <field reporter:label="Item Count" name="item_count" reporter:datatype="int"/>
10835                         <field reporter:label="Receive Count" name="recv_count" reporter:datatype="int"/>
10836                         <field reporter:label="Cancel Count" name="cancel_count" reporter:datatype="int"/>
10837                         <field reporter:label="Delay Count" name="delay_count" reporter:datatype="int"/>
10838                         <field reporter:label="Invoice Count" name="invoice_count" reporter:datatype="int"/>
10839                         <field reporter:label="Claim Count" name="claim_count" reporter:datatype="int"/>
10840                         <field reporter:label="Estimated Amount" name="estimated_amount" reporter:datatype="money"/>
10841                         <field reporter:label="Encumbrance Amount" name="encumbrance_amount" reporter:datatype="money"/>
10842                         <field reporter:label="Paid Amount" name="paid_amount" reporter:datatype="money"/>
10843                 </fields>
10844                 <links>
10845                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub"/>
10846                 </links>
10847     </class>
10848         <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">
10849                 <oils_persist:source_definition>
10850
10851                         SELECT  t.*
10852                           FROM  action.transit_copy t
10853                                 JOIN actor.org_unit AS s ON (t.source = s.id)
10854                                 JOIN actor.org_unit AS d ON (t.dest = d.id)
10855                           WHERE s.parent_ou &lt;&gt; d.parent_ou
10856
10857                 </oils_persist:source_definition>
10858                 <fields oils_persist:primary="id" oils_persist:sequence="action.transit_copy_id_seq">
10859                         <field reporter:label="Pretransit Copy Status" name="copy_status" reporter:datatype="link"/>
10860                         <field reporter:label="Destination" name="dest" reporter:datatype="link"/>
10861                         <field reporter:label="Receive Date/Time" name="dest_recv_time" reporter:datatype="timestamp"/>
10862                         <field reporter:label="Transit ID" name="id" reporter:datatype="id"/>
10863                         <field reporter:label="Is Persistent? (unused)" name="persistant_transfer" reporter:datatype="bool"/>
10864                         <field reporter:label="Previous Hop (unused)" name="prev_hop" reporter:datatype="link"/>
10865                         <field reporter:label="Source" name="source" reporter:datatype="link"/>
10866                         <field reporter:label="Send Date/Time" name="source_send_time" reporter:datatype="timestamp"/>
10867                         <field reporter:label="Transited Copy" name="target_copy" reporter:datatype="link"/>
10868                         <field reporter:label="Hold Transit" name="hold_transit_copy" oils_persist:virtual="true" reporter:datatype="link"/>
10869                 </fields>
10870                 <links>
10871                         <link field="hold_transit_copy" reltype="might_have" key="id" map="" class="ahtc"/>
10872                         <link field="source" reltype="has_a" key="id" map="" class="aou"/>
10873                         <link field="copy_status" reltype="has_a" key="id" map="" class="ccs"/>
10874                         <link field="dest" reltype="has_a" key="id" map="" class="aou"/>
10875                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10876                         <link field="prev_hop" reltype="has_a" key="id" map="" class="atc"/>
10877                 </links>
10878         </class>
10879
10880     <class id="circbyyr" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="action::circ_counts_by_year" oils_persist:readonly="true">
10881                 <oils_persist:source_definition>
10882
10883         SELECT copy, SUM(count) AS count, year, is_renewal FROM (
10884                 SELECT
10885                         cp.id as copy,
10886                         COUNT(circ.id),
10887                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10888                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10889                 FROM
10890                         asset.copy cp
10891                                 JOIN action.circulation circ ON (cp.id = circ.target_copy)
10892                 GROUP BY 1, 3, 4
10893                 UNION ALL
10894                 SELECT
10895                         cp.id as copy,
10896                         COUNT(circ.id),
10897                         EXTRACT(YEAR FROM circ.xact_start) AS year,
10898                         (phone_renewal OR desk_renewal OR opac_renewal) as is_renewal
10899                 FROM
10900                         asset.copy cp
10901                                 JOIN action.aged_circulation circ ON (cp.id = circ.target_copy)
10902                 GROUP BY 1, 3, 4
10903                 UNION ALL
10904                 SELECT
10905                         id as copy,
10906                         circ_count,
10907                         -1 AS year,
10908                         false as is_renewal
10909                 FROM
10910                         extend_reporter.legacy_circ_count
10911         )x GROUP BY 1, 3, 4
10912
10913                 </oils_persist:source_definition>
10914         <fields>
10915             <field reporter:label="Copy ID" name="copy" reporter:datatype="link"/>
10916             <field reporter:label="Count" name="count" reporter:datatype="int"/>
10917             <field reporter:label="Year" name="year" reporter:datatype="int"/>
10918             <field reporter:label="Renewal" name="is_renewal" reporter:datatype="bool"/>
10919         </fields>
10920                 <links>
10921                         <link field="copy" reltype="has_a" key="id" map="" class="acp"/>
10922                 </links>
10923                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
10924                         <actions>
10925                                 <retrieve/>
10926                         </actions>
10927                 </permacrud>
10928     </class>
10929
10930         <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">
10931                 <fields oils_persist:primary="id" oils_persist:sequence="money.billable_xact_id_seq">
10932                         <field reporter:label="Check In Library" name="checkin_lib" reporter:datatype="org_unit"/>
10933                         <field reporter:label="Check In Staff" name="checkin_staff" reporter:datatype="link"/>
10934                         <field reporter:label="Check In Date/Time" name="checkin_time" reporter:datatype="timestamp"/>
10935                         <field reporter:label="Circulating Library" name="circ_lib"  reporter:datatype="org_unit"/>
10936                         <field reporter:label="Circulating Staff" name="circ_staff" reporter:datatype="link"/>
10937                         <field reporter:label="Desk Renewal" name="desk_renewal" reporter:datatype="bool"/>
10938                         <field reporter:label="Due Date/Time" name="due_date" reporter:datatype="timestamp"/>
10939                         <field reporter:label="Circulation Duration" name="duration" reporter:datatype="interval"/>
10940                         <field reporter:label="Circ Duration Rule" name="duration_rule" reporter:datatype="link"/>
10941                         <field reporter:label="Fine Interval" name="fine_interval" reporter:datatype="interval"/>
10942                         <field reporter:label="Circ ID" name="id" reporter:datatype="id" />
10943                         <field reporter:label="Max Fine Amount" name="max_fine" reporter:datatype="money" />
10944                         <field reporter:label="Max Fine Rule" name="max_fine_rule" reporter:datatype="link"/>
10945                         <field reporter:label="OPAC Renewal" name="opac_renewal" reporter:datatype="bool"/>
10946                         <field reporter:label="Phone Renewal" name="phone_renewal" reporter:datatype="bool"/>
10947                         <field reporter:label="Recurring Fine Amount" name="recurring_fine" reporter:datatype="money" />
10948                         <field reporter:label="Recurring Fine Rule" name="recurring_fine_rule" reporter:datatype="link"/>
10949                         <field reporter:label="Remaining Renewals" name="renewal_remaining" reporter:datatype="int" />
10950                         <field reporter:label="Fine Stop Reason" name="stop_fines" reporter:datatype="text"/>
10951                         <field reporter:label="Fine Stop Date/Time" name="stop_fines_time" reporter:datatype="timestamp"/>
10952                         <field reporter:label="Circulating Item" name="target_copy" reporter:datatype="link"/>
10953                         <field reporter:label="Patron" name="usr" reporter:datatype="link"/>
10954                         <field reporter:label="Transaction Finish Date/Time" name="xact_finish" reporter:datatype="timestamp" />
10955                         <field reporter:label="Checkout Date/Time" name="xact_start" reporter:datatype="timestamp" />
10956                         <field reporter:label="Transaction Billings" name="billings" oils_persist:virtual="true" reporter:datatype="link"/>
10957                         <field reporter:label="Transaction Payments" name="payments" oils_persist:virtual="true" reporter:datatype="link"/>
10958                         <field reporter:label="Base Transaction" name="billable_transaction" oils_persist:virtual="true" reporter:datatype="link"/>
10959                         <field reporter:label="Circulation Type" name="circ_type" oils_persist:virtual="true" reporter:datatype="link"/>
10960                         <field reporter:label="Billing Totals" name="billing_total" oils_persist:virtual="true" reporter:datatype="link"/>
10961                         <field reporter:label="Payment Totals" name="payment_total" oils_persist:virtual="true" reporter:datatype="link"/>
10962                 </fields>
10963                 <links>
10964                         <link field="billable_transaction" reltype="might_have" key="id" map="" class="mbt"/>
10965                         <link field="circ_staff" reltype="has_a" key="id" map="" class="au"/>
10966                         <link field="checkin_lib" reltype="has_a" key="id" map="" class="aou"/>
10967                         <link field="target_copy" reltype="has_a" key="id" map="" class="acp"/>
10968                         <link field="checkin_staff" reltype="has_a" key="id" map="" class="au"/>
10969                         <link field="usr" reltype="has_a" key="id" map="" class="au"/>
10970                         <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
10971                         <link field="payments" reltype="has_many" key="xact" map="" class="mp"/>
10972                         <link field="billings" reltype="has_many" key="xact" map="" class="mb"/>
10973                         <link field="duration_rule" reltype="has_a" key="name" map="" class="crcd"/>
10974                         <link field="max_fine_rule" reltype="has_a" key="name" map="" class="crmf"/>
10975                         <link field="recurring_fine_rule" reltype="has_a" key="name" map="" class="crrf"/>
10976                         <link field="circ_type" reltype="might_have" key="id" map="" class="rcirct"/>
10977                         <link field="billing_total" reltype="might_have" key="xact" map="" class="rxbt"/>
10978                         <link field="payment_total" reltype="might_have" key="xact" map="" class="rxpt"/>
10979                 </links>
10980         </class>
10981
10982     <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">
10983         <fields oils_persist:primary="id">
10984             <field reporter:label="Title" name="title" reporter:datatype="text"/>
10985             <field reporter:label="Author" name="author" reporter:datatype="text"/>
10986             <field reporter:label="Pubdate" name="pubdate" reporter:datatype="text"/>
10987             <field reporter:label="Copy ID" name="id" reporter:datatype="id"/>
10988             <field reporter:label="Price" name="price" reporter:datatype="money"/>
10989             <field reporter:label="Barcode" name="barcode" reporter:datatype="text"/>
10990             <field reporter:label="Callnumber Label" name="call_number_label" reporter:datatype="text"/>
10991             <field reporter:label="Dewy Tens" name="dewey_block_tens" reporter:datatype="text"/>
10992             <field reporter:label="Dewy Hundreds" name="dewey_block_hundreds" reporter:datatype="text"/>
10993             <field reporter:label="Use Count" name="use_count" reporter:datatype="int"/>
10994             <field reporter:label="Circ Modifier" name="circ_modifier" reporter:datatype="text"/>
10995             <field reporter:label="Shelving Location Name" name="shelving_location" reporter:datatype="text"/>
10996             <field reporter:label="Legacy Stat Cat 1" name="stat_cat_1" reporter:datatype="link"/>
10997             <field reporter:label="Legacy Stat Cat 2" name="stat_cat_2" reporter:datatype="link"/>
10998             <field reporter:label="Legacy Stat Cat 1 Value" name="stat_cat_1_value" reporter:datatype="text"/>
10999             <field reporter:label="Legacy Stat Cat 2 Value" name="stat_cat_2_value" reporter:datatype="text"/>
11000             <field reporter:label="Edit Date" name="edit_date" reporter:datatype="timestamp"/>
11001             <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
11002             <field reporter:label="Owning Lib Name" name="owning_lib_name" reporter:datatype="text"/>
11003             <field reporter:label="Circ Lib Name" name="circ_lib_name" reporter:datatype="text"/>
11004             <field reporter:label="Owning Lib" name="owning_lib" reporter:datatype="link"/>
11005             <field reporter:label="Circ Lib" name="circ_lib" reporter:datatype="link"/>
11006             <field reporter:label="Creator" name="creator" reporter:datatype="link"/>
11007             <field reporter:label="Age Protection" name="age_protect" reporter:datatype="link"/>
11008             <field reporter:label="OPAC Visible" name="opac_visible" reporter:datatype="bool"/>
11009             <field reporter:label="Reference" name="ref" reporter:datatype="bool"/>
11010             <field reporter:label="Deposit Amount" name="deposit_amount" reporter:datatype="text"/>
11011             <field reporter:label="Deleted" name="deleted" reporter:datatype="bool"/>
11012             <field reporter:label="TCN" name="tcn_value" reporter:datatype="text"/>
11013             <field reporter:label="Status" name="status" reporter:datatype="link"/>
11014             <field reporter:label="Stop Fines Reason" name="stop_fines" reporter:datatype="text"/>
11015             <field reporter:label="Due Date" name="due_date" reporter:datatype="timestamp"/>
11016             <field reporter:label="Patron Barcode" name="patron_barcode" reporter:datatype="text"/>
11017             <field reporter:label="Patron Name" name="patron_name" reporter:datatype="text"/>
11018         </fields>
11019         <links>
11020             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11021             <link field="id" reltype="has_a" key="id" map="" class="acp"/>
11022             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11023             <link field="creator" reltype="has_a" key="id" map="" class="au"/>
11024             <link field="age_protect" reltype="has_a" key="id" map="" class="crahp"/>
11025             <link field="status" reltype="has_a" key="id" map="" class="ccs"/>
11026             <link field="stat_cat_1" reltype="might_have" key="id" map="" class="rsce1"/>
11027             <link field="stat_cat_2" reltype="might_have" key="id" map="" class="rsce2"/>
11028         </links>
11029     </class>
11030
11031     <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">
11032         <fields oils_persist:primary="id">
11033             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11034             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11035             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11036             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11037         </fields>
11038         <links>
11039             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11040             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11041         </links>
11042     </class>
11043
11044     <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">
11045         <fields oils_persist:primary="owning_lib">
11046             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11047             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11048             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11049         </fields>
11050         <links>
11051             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11052         </links>
11053     </class>
11054
11055     <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">
11056         <fields oils_persist:primary="id">
11057             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11058             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11059             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11060             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11061             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11062         </fields>
11063         <links>
11064             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11065             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11066             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11067         </links>
11068     </class>
11069
11070     <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">
11071         <fields oils_persist:primary="circ_lib">
11072             <field reporter:label="Circulating Library" name="circ_lib" reporter:datatype="org_unit"/>
11073             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11074             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11075             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11076         </fields>
11077         <links>
11078             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11079             <link field="circ_lib" reltype="has_a" key="id" map="" class="aou"/>
11080         </links>
11081     </class>
11082
11083     <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">
11084         <fields oils_persist:primary="id">
11085             <field reporter:label="Circulation ID" name="id" reporter:datatype="link"/>
11086             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11087             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11088             <field reporter:label="Billing Type" name="billing_type" reporter:datatype="text"/>
11089             <field reporter:label="Total Billed" name="billed" reporter:datatype="money"/>
11090         </fields>
11091         <links>
11092             <link field="id" reltype="has_a" key="id" map="" class="circ"/>
11093             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11094             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11095         </links>
11096     </class>
11097
11098     <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">
11099         <fields oils_persist:primary="home_ou">
11100             <field reporter:label="User Home Library" name="home_ou" reporter:datatype="org_unit"/>
11101             <field reporter:label="Owning Library" name="owning_lib" reporter:datatype="org_unit"/>
11102             <field reporter:label="Billing Types" name="billing_types" reporter:datatype="text"/>
11103             <field reporter:label="Balance" name="balance" reporter:datatype="money"/>
11104         </fields>
11105         <links>
11106             <link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
11107             <link field="home_ou" reltype="has_a" key="id" map="" class="aou"/>
11108         </links>
11109     </class>
11110         <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">
11111                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_id_seq">
11112                         <field reporter:label="Fund Tag ID" name="id" reporter:datatype="id"/>
11113                         <field reporter:label="Fund Tag Owner" name="owner" reporter:datatype="org_unit"/>
11114                         <field reporter:label="Fund Tag Name" name="name" reporter:datatype="text"/>
11115                         <field reporter:label="Map Entries" name="map_entries" oils_persist:virtual="true" reporter:datatype="link"/>
11116                 </fields>
11117                 <links>
11118                         <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
11119                         <link field="map_entries" reltype="has_many" key="fund" map="" class="acqftm"/>
11120                 </links>
11121                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11122                         <actions>
11123                                 <create permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11124                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND" context_field="owner"/>
11125                                 <update permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11126                         <delete permission="ADMIN_ACQ_FUND_TAG" context_field="owner"/>
11127                         </actions>
11128                 </permacrud>
11129         </class>
11130         <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">
11131                 <fields oils_persist:primary="id" oils_persist:sequence="acq.fund_tag_map_id_seq">
11132                         <field reporter:label="Map Entry ID" name="id" reporter:datatype="id"/>
11133                         <field reporter:label="Fund ID" name="fund" reporter:datatype="link"/>
11134                         <field reporter:label="Tag ID" name="tag" reporter:datatype="link"/>
11135                 </fields>
11136                 <links>
11137                         <link field="fund" reltype="has_a" key="id" map="" class="acqf"/>
11138                         <link field="tag" reltype="has_a" key="id" map="" class="acqft"/>
11139                         </links>
11140                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11141                 <actions>
11142                                 <create permission="ADMIN_ACQ_FUND_TAG">
11143                                         <context link="tag" field="owner"/>
11144                                 </create>
11145                                 <retrieve permission="ADMIN_ACQ_FUND_TAG ADMIN_ACQ_FUND VIEW_FUND MANAGE_FUND">
11146                                         <context link="tag" field="owner"/>
11147                                 </retrieve>
11148                                 <update permission="ADMIN_ACQ_FUND_TAG">
11149                                         <context link="tag" field="owner"/>
11150                                 </update>
11151                                 <delete permission="ADMIN_ACQ_FUND_TAG">
11152                                         <context link="tag" field="owner"/>
11153                                 </delete>
11154                         </actions>
11155                 </permacrud>
11156         </class>
11157         <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">
11158                 <oils_persist:source_definition><![CDATA[
11159                 SELECT
11160                         poi.purchase_order AS purchase_order,
11161                         ii.invoice AS invoice,
11162                         NULL AS lineitem,
11163                         poi.id AS po_item,
11164                         NULL AS picklist
11165                 FROM
11166                         acq.po_item poi
11167                         JOIN acq.invoice_item ii ON (ii.po_item = poi.id)
11168                 UNION SELECT
11169                         jub.purchase_order AS purchase_order,
11170                         ie.invoice AS invoice,
11171                         jub.id AS lineitem,
11172                         NULL AS po_item,
11173                         jub.picklist AS picklist
11174                 FROM
11175                         acq.lineitem jub
11176                         JOIN acq.invoice_entry ie ON (ie.lineitem = jub.id)
11177                 UNION SELECT
11178                         ii.purchase_order AS purchase_order,
11179                         ii.invoice AS invoice,
11180                         NULL AS lineitem,
11181                         NULL AS po_item,
11182                         NULL AS picklist
11183                 FROM
11184                         acq.invoice_item ii
11185                 WHERE ii.po_item IS NULL
11186                 UNION SELECT
11187                         ie.purchase_order AS purchase_order,
11188                         ie.invoice AS invoice,
11189                         NULL AS lineitem,
11190                         NULL AS po_item,
11191                         NULL AS picklist
11192                 FROM
11193                         acq.invoice_entry ie
11194                 WHERE ie.lineitem IS NULL
11195                 UNION SELECT
11196                         NULL AS purchase_order,
11197                         NULL AS invoice,
11198                         jub.id AS lineitem,
11199                         NULL AS po_item,
11200                         jub.picklist AS picklist
11201                 FROM
11202                         acq.lineitem jub
11203                 WHERE jub.purchase_order IS NULL
11204                 ]]></oils_persist:source_definition>
11205                 <fields>
11206                         <field reporter:label="Purchase Order ID" name="purchase_order" reporter:datatype="link"/>
11207                         <field reporter:label="Lineitem ID" name="lineitem" reporter:datatype="link"/>
11208                         <field reporter:label="Invoice ID" name="invoice" reporter:datatype="link"/>
11209                         <field reporter:label="Purchase Order Item ID" name="po_item" reporter:datatype="link"/>
11210                         <field reporter:label="Picklist ID" name="picklist" reporter:datatype="link"/>
11211                 </fields>
11212                 <links>
11213                         <link field="purchase_order" reltype="has_a" key="id" map="" class="acqpo" />
11214                         <link field="lineitem" reltype="has_a" key="id" map="" class="jub" />
11215                         <link field="invoice" reltype="has_a" key="id" map="" class="acqinv" />
11216                         <link field="po_item" reltype="has_a" key="id" map="" class="acqpoi" />
11217                         <link field="picklist" reltype="has_a" key="id" map="" class="acqpl" />
11218                 </links>
11219         </class>
11220         <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">
11221                 <fields oils_persist:primary="id" oils_persist:sequence="config.barcode_completion_id_seq">
11222                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11223                         <field reporter:label="Active" name="active" reporter:datatype="bool"/>
11224                         <field reporter:label="Owner" name="org_unit" reporter:datatype="org_unit"/>
11225                         <field reporter:label="Prefix" name="prefix" reporter:datatype="text"/>
11226                         <field reporter:label="Suffix" name="suffix" reporter:datatype="text"/>
11227                         <field reporter:label="Length" name="length" reporter:datatype="int"/>
11228                         <field reporter:label="Padding" name="padding" reporter:datatype="text"/>
11229                         <field reporter:label="Padding At End" name="padding_end" reporter:datatype="bool"/>
11230                         <field reporter:label="Applies to Items" name="asset" reporter:datatype="bool"/>
11231                         <field reporter:label="Applies to Users" name="actor" reporter:datatype="bool"/>
11232                 </fields>
11233                 <links>
11234                         <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
11235                 </links>
11236                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11237                         <actions>
11238                                 <create permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11239                                 <retrieve/>
11240                                 <update permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11241                                 <delete permission="UPDATE_ORG_UNIT_SETTING_ALL" context_field="org_unit"/>
11242                         </actions>
11243                 </permacrud>
11244         </class>
11245
11246         <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">
11247                 <fields oils_persist:primary="id" oils_persist:sequence="config.org_unit_setting_type_log_id_seq">
11248                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11249                         <field name="date_applied" reporter:datatype="timestamp"/>
11250                         <field name="org" reporter:datatype="org_unit"/>
11251                         <field name="original_value" reporter:datatype="text"/>
11252                         <field name="new_value" reporter:datatype="text"/>
11253                         <field name="field_name" reporter:datatype="link"/>
11254                 </fields>
11255                 <links>
11256                         <link field="field_name" reltype="has_a" key="name" map="" class="coust"/>
11257                         <link field="org" reltype="has_a" key="id" map="" class="aou"/>
11258                 </links>
11259                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11260                         <actions>
11261                                 <create permission="ADMIN_ORG_UNIT_SETTING_TYPE" context_field="org"/>
11262                                 <retrieve permission="STAFF_LOGIN" context_field="org"/>
11263                                 <update permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11264                                 <delete permission="ADMIN_ORG_UNIT_SETTING_TYPE_LOG" context_field="org"/>
11265                         </actions>
11266                 </permacrud>
11267         </class>
11268         <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">
11269                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11270                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11271                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11272                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11273                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11274                 </fields>
11275                 <links>
11276                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11277                         <link field="stat_cat" reltype="has_a" key="id" map="" class="actsc"/>
11278                 </links>
11279         </class>
11280         <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">
11281                 <fields oils_persist:primary="id" oils_persist:sequence="action.archive_actor_stat_cat_id_seq">
11282                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11283                         <field reporter:label="Circ" name="xact" reporter:datatype="link"/>
11284                         <field reporter:label="Statistical Category" name="stat_cat" reporter:datatype="link"/>
11285                         <field reporter:label="Entry Value" name="value" reporter:datatype="text"/>
11286                 </fields>
11287                 <links>
11288                         <link field="xact" reltype="has_a" key="id" map="" class="combcirc"/>
11289                         <link field="stat_cat" reltype="has_a" key="id" map="" class="asc"/>
11290                 </links>
11291         </class>
11292         <class id="cfg" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group" oils_persist:tablename="config.floating_group" reporter:label="Floating Group">
11293                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_id_seq">
11294                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11295                         <field reporter:label="Name" name="name" reporter:datatype="text"/>
11296                         <field reporter:label="Manual" name="manual" reporter:datatype="bool"/>
11297                         <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
11298                 </fields>
11299                 <links>
11300                         <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
11301                 </links>
11302                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11303                         <actions>
11304                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11305                                 <retrieve/>
11306                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11307                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11308                         </actions>
11309                 </permacrud>
11310         </class>
11311         <class id="cfgm" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::floating_group_member" oils_persist:tablename="config.floating_group_member" reporter:label="Floating Group Members">
11312                 <fields oils_persist:primary="id" oils_persist:sequence="config.floating_group_member_id_seq">
11313                         <field reporter:label="ID" name="id" reporter:datatype="id"/>
11314                         <field reporter:label="Floating Group" name="floating_group" reporter:datatype="link"/>
11315                         <field reporter:label="Org Unit" name="org_unit" reporter:datatype="link"/>
11316                         <field reporter:label="Stop Depth" name="stop_depth" reporter:datatype="int"/>
11317                         <field reporter:label="Max Depth" name="max_depth" reporter:datatype="int"/>
11318                         <field reporter:label="Exclude" name="exclude" reporter:datatype="bool"/>
11319                 </fields>
11320                 <links>
11321                         <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
11322                         <link field="org_unit" reltype="has_a" key="id" class="aou"/>
11323                 </links>
11324                 <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
11325                         <actions>
11326                                 <create permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11327                                 <retrieve/>
11328                                 <update permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11329                                 <delete permission="ADMIN_FLOAT_GROUPS" global_required="true"/>
11330                         </actions>
11331                 </permacrud>
11332         </class>
11333
11334         <!-- ********************************************************************************************************************* -->
11335
11336 </IDL>
11337
11338 <!--
11339     vim:noet:ts=4:sw=4:
11340 -->